Login Retreive lost passwordRegister
Search

Manual  /  Functions  /  Look & Feel  /  BorderStart

BorderStart
BorderStart (
string $caption = null,
string $name = null,
mixed $extra = null 
)

Arguments:

Name Description
$caption The caption of the fieldset.
$name The name of the fieldset. This name will also be used as id of the fieldset (in the HTML tag!), so you can use it in javascript. When no name is given, a name will be generated.
$extra This can be extra information which will be included in the fieldset's html tag. You can add for example some CSS or javascript.

Description:

Sets a border arround the upcomming fields untill borderStop() is called. (Creates a fieldset.)

Note: The look of the fieldset can be changes in the configuration file (FH_FIELDSET_MASK)!

Example

<?php 

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

// some options used in the form 
$browsers = array( 
  
"IE"  => "Microsoft Internet Explorer"
  
"NN"  => "Netscape Navigator"
  
"MOZ" => "Mozilla"
  
"FF"  => "Firefox"
  
"OP"  => "Opera"
  
"-1"  => "Other..." 
); 

// create new formhandler object 
$form = new FormHandler(); 

// start a fieldset! 
$form -> borderStart("Browser"); 

// set a mask for the upcoming field 
$form -> setMask
  
"  <tr><td>%title%:</td></tr>\n"
  
"  <tr><td>%field% %error%</td></tr>\n"
  
# repeat it once (so for the upcoming 2 fields!!) 
); 

// browsers to select from 
$form -> radioButton("Select the browser you use""browsers"$browsers); 
// which version of the browser? 
$form -> textField("Version""version"FH_FLOAT55); 

// stop the border 
$form -> borderStop(); 

// button to submit the form 
$form -> submitButton(); 

// set the data handler 
$form -> onCorrect("doRun"); 

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

// the data handler 
function dorun$data 

    
// do something here... 


?>

Preview image

preview image

See also: BorderStop

Latest change: 05 March 10 / 08:44

Comments

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