|
|
|
|
|
|
(Since version FH3-v1.2)
SetTableSettings |
SetTableSettings (
integer |
$width = null, |
integer |
$cellspacing = null, |
integer |
$cellpadding = null, |
integer |
$border = null, |
mixed |
$extra = null |
) |
Arguments:
Name |
Description |
$width |
The width of the table where the fields are set in. The default value of the table is set in the config file with the var FH_DEFAULT_TABLE_WIDTH. |
$cellspacing |
The space between the cells in the table. The default value is set in the configuration file with the var FH_DEFAULT_TABLE_CELLSPACING. |
$cellpadding |
The space between the cell border and the cell contents. The default value is set in the configuration file with the var FH_DEFAULT_TABLE_CELLPADDING. |
$border |
The thickness of the border of the table. The default value is set in the configuration file with the var FH_DEFAULT_TABLE_BORDER. |
$extra |
This can be extra information which will be included in the table's html tag. You can add for example some CSS or javascript. |
Description:
With this function you can change the look of the table where the fields are displayed in.
Note: If you don't want FormHandler to set a <table> tag arround the content, please use the function useTable to disable it.
Example
<?php
// include the class
include("FH3/class.FormHandler.php");
// make a new $form object
$form = new FormHandler;
// set the table settings
$form -> setTableSettings(400, 2, 2, 0, ' style="border: 1px solid green"' );
// a textfield
$form -> textField("Your name", "name", FH_STRING );
// button beneath it
$form -> submitButton();
// set the 'commit after form' function
$form -> onCorrect( "doRun" );
// send the form to the screen
$form-> flush();
// function to show a message
function doRun($data)
{
return "Hello ". $data["name"];
}
?>
|
Preview image
See also: UseTable
Latest change: 14 February 08 / 13:26
Comments
|
|
|
|