Login Retreive lost passwordRegister
Search

Manual  /  Functions  /  Buttons  /  Button

Button
Button (
string $caption
string $name = null,
string $extra = null 
)

Arguments:

Name Description
$caption The caption of the button
$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:

Creates a button on the form.

Example

<?php 

// include the class 
include('FH3/class.FormHandler.php'); 

// create new formhandler object 
$form = new FormHandler

// the button 
$form -> button("Test""btnTest""onclick='alert(this.name)'"); 

// what to do when the form is correct... 
$form -> onCorrect('doRun'); 

// flush the form 
$form -> flush(); 

// the commit after form function... 
function doRun($data

    
// do something here... 

?>

Preview image

preview image

Latest change: 05 March 10 / 08:40

Comments

powered by PHP-GLOBE   © 2004 - 2024 FormHandler. All rights reserved.   -   Open source license