|
|
|
|
|
|
ResetButton |
ResetButton (
string |
$caption = "Reset", |
string |
$name = null, |
mixed |
$extra = null |
) |
Arguments:
Name |
Description |
$caption |
The caption of the button. The default caption is "Reset", but this is language dependent. |
$name |
Name of the button. A name is generated if none is given. |
$extra |
This can be extra information which will be included in the buttons html tag. You can add for example some CSS or javascript. |
Description:
Create a resetButton on the form which resets the values of the fields
Example
<?php
// include the class
include('FH3/class.FormHandler.php');
// create new formhandler object
$form = new FormHandler;
// a textfield
$form -> textField("Name", "name", FH_STRING);
// the reset button
$form -> resetButton();
// what to do when the form is correct...
$form -> onCorrect('doRun');
// flush the form
$form -> flush();
// the commit after form function...
function doRun( $data )
{
return "Hello ". $data['name'] ."\n";
}
?>
|
Preview image
Latest change: 05 March 10 / 08:41
Comments
|
|
|
|