'); print_r($argument); print_r(''); } // if script needs to die() after output, die if (isset($stop)) die(); } ?> Zebra_Form, a jQuery augmented PHP library for HTML form building and validation
Stefan Gabos | webdeveloper
Example for: Zebra_Form, a jQuery augmented PHP library for HTML form building and validation
'; foreach ($_POST as $key => $value) { if (strpos($key, 'name_') !== 0 && strpos($key, 'timer_') !== 0 && strpos($key, 'response_') !== 0) echo ''; } echo '
Submitted values
' . $key . '' . (is_array($value) ? '
' . print_r($value, true) . '
' : $value) . '
'; } $demos = array( 'A login form' => array('login', array( 'Auto template, vertical' => 'vertical', 'Auto template, horizontal' => 'horizontal', 'Auto template, labels inside' => 'labels-inside', 'Custom template - divs' => 'divs-custom', 'Custom template - tables' => 'tables-custom', )), 'A contact form' => array('contact', array( 'Auto template, vertical' => 'vertical', 'Auto template, horizontal' => 'horizontal', 'Custom template' => 'custom', )), 'A registration form' => array('registration', array( 'Auto template, vertical' => 'vertical', 'Auto template, horizontal' => 'horizontal', 'Custom template' => 'custom', )), 'A reservation form' => array('reservation', array( 'Auto template, vertical' => 'vertical', 'Auto template, horizontal' => 'horizontal', 'Custom template' => 'custom', 'Auto-fill' => 'autofill-vertical', )), 'Dependencies' => array('dependencies', array( 'Example 1' => 'example1-custom', 'Example 2' => 'example2-custom', )), 'File upload' => array('fileupload', array( 'Basic file upload' => 'basic-vertical', 'Basic image upload' => 'basic-image-vertical', )), 'More rules' => array('validation', array( 'Auto template, vertical' => 'vertical', )), ); $current_template = isset($_GET['template']) ? strtolower($_GET['template']) : ''; if (isset($_GET['example']) && is_file('includes/' . $_GET['example'] . '-' . $current_template . '.php')) { $current_example = strtolower($_GET['example']); } else { $current_template = 'vertical'; $current_example = 'login'; } ?>
> render\(\'includes\/custom\-templates\/.*?\'\)\;/', ); $replacements = array( 'render(\'path/to/custom-template.php\');', ); $php_source = preg_replace($patterns, $replacements, $php_source); ?>

In this example, the output is automatically generated by Zebra_Form's render method.

Use the links to the left to navigate between examples.