This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$c = $page->children->eq(1); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
http://processwire.com/talk/topic/1938-building-an-advanced-search-form-with-form-builder/?p=18151 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// http://processwire.com/talk/topic/1938-building-an-advanced-search-form-with-form-builder/?p=36295 | |
<form name='search' id='product-search' method='get' action='<?php echo $config->urls->root?>speaker-finder/'> | |
<ul id="row1"> | |
<li> | |
<label for='search_app'>Application</label> | |
<select id='search_app' name='application' onchange="$(this.form).trigger('submit')"> | |
<option value=''>Any</option><?php | |
// generate the application options, checking the whitelist to see if any are already selected |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// http://processwire.com/talk/topic/1938-building-an-advanced-search-form-with-form-builder/?p=36295 | |
// check if there are GET variables present in the URL | |
if(count($input->get)) { | |
$selector = ''; | |
if($input->get->application) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if($input->post->step == 1) { | |
// process step 1 form and display step 2 form | |
$email = $sanitizer->email($input->post->email); | |
$session->email = $email; | |
echo " | |
<form method='post' action='./'> | |
<input type='text' name='fullname' placeholder='your full name'> | |
<input type='hidden' name='step' value='2'> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// ------------------------------ FORM Processing --------------------------------------- | |
$errors = null; | |
$success = false; | |
// helper function to format form errors | |
function showError($e){ | |
return "<p class='error'>$e</p>"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> | |
<title>Enquire Test</title> | |
<meta name="viewport" content="width=device-width"> | |
<!-- Normalize CSS --> | |
<link rel="stylesheet" src="http://normalize-css.googlecode.com/svn/trunk/normalize.css"/> | |
<!-- Bootstrap CSS --> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// get a page | |
$editpage = $pages->get("/editme/"); | |
$ignorefields = array("isOld","language_published"); | |
$form = $modules->get("InputfieldForm"); | |
$form->method = 'post'; | |
$form->action = './'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* This module is build by Adrian, tnx Adrian. | |
* | |
* | |
* Module to hide pages that are not editable by the logged in user. | |
* | |
* ProcessWire 2.x | |
* Copyright (C) 2010 by Ryan Cramer |