|
|
|
|
|
|
This function is still beta!
Arguments:
Description:
Note: This function does not work with edit forms!!
This function will split your form up in multiple pages. Very easy to generate wizard-like forms.
Example
<?php
// include the class
include("FH3/class.FormHandler.php");
// create a new form
$form = new FormHandler();
//first page...
$form -> textField("Question 1", "q1", FH_STRING, 30, 50);
$form -> submitButton("Next page");
// second page
$form -> newPage();
$form -> textArea("Question 2", "q2", FH_TEXT);
$form -> submitButton("Next Page");
// third and last page
$form -> newPage();
$form -> textField("Question 3", "q3", FH_STRING);
$form -> submitButton("Submit");
// set the handler function
$form -> onCorrect("doRun");
// flush the form..
$form -> flush();
// data handler
function doRun( $data )
{
echo "Data submitted:";
echo "<pre>\n";
print_r( $data );
echo "</pre>\n";
}
?>
|
Preview image
See also: BackButton
Latest change: 05 March 10 / 08:45
Comments
|
|
|
|