Form with a selectionbox that triggers a reload when changed

The purpose of this form is to reload the webpage when the value of the selection box, contained in the form, is changed.

A select form contains a selection box. When a value is changed in this selection box, the page is reloaded and the value is submitted.

category Form
package Formaid
author Dieter Adriaenssens
copyright 2006-2013 Dieter Adriaenssens
license GPL
link http://formaid.sourceforge.net/

 Methods

Constructor, initialises an instance of Formaid_SelectForm

__construct(string $ID, string $table_name, string $field_name, string $file_name, string $orderby, string $return_url, string $database) : void

Parameters

$ID

string

Name of ID column (index)

$table_name

string

Table name

$field_name

string

Name of name column (caption)

$file_name

string

File name of page containing the table

$orderby

string

SQL column name to order by

$return_url

string

URL to return to after processing form

$database

string

Database to use

Displays a HTML form.

display(string $mode) : void
Inherited
inherited_from \Formaid_Form::display()

Parameters

$mode

string

Mode this function is working in (form, value)

Display record values

displayValues() : void
Inherited

Execute display() method in "values" mode. In this mode, no form is displayed, but the values of the record are printed on the webpage. The values can't be edited.

inherited_from \Formaid_Form::displayValues()

Generates HTML for a record form on a web page.

getDisplayString(string $mode) : string
Inherited

If the mode is form, a form is shown : this includes a title, form tags and form fields (input boxes, ...) If the mode is value, only the values of a record are shown, there is no possibility to change and submit values.

inherited_from \Formaid_Form::getDisplayString()

Parameters

$mode

string

Mode this function is working in (form, values)

Returns

string

Custom string that will be appended before automatically generated form

getDisplayStringPrefix(string $mode) : string
Inherited
inherited_from \Formaid_Form::getDisplayStringPrefix()

Parameters

$mode

string

Mode this function is working in (form, values)

Returns

string

Custom string that will be appended after automatically generated form

getDisplayStringSuffix(string $mode) : string
Inherited
inherited_from \Formaid_Form::getDisplayStringSuffix()

Parameters

$mode

string

Mode this function is working in (form, values)

Returns

string

Displays a HTML form.

show(string $mode) : void
Inherited
inherited_from \Formaid_Form::show()

Parameters

$mode

string

Mode this function is working in (form, value)

Display record values

showValues() : void
Inherited

Execute display() method in "values" mode. In this mode, no form is displayed, but the values of the record are printed on the webpage. The values can't be edited.

inherited_from \Formaid_Form::showValues()

Checks if displaying the form is allowed.

allowShow() : bool
Inherited

If the Privilege on this form (allow_show) is set, it is allowed to display the form.

inherited_from \Formaid_Form::allowShow()

Returns

booltrue if displaying is allowed.

Redirect to a new url

redirectToUrl(string $message) : void
Inherited

Usually this happens after an insert/modify or delete

inherited_from \Formaid_Form::redirectToUrl()

Parameters

$message

string

Message for user to pass in the url

Add a selection field to the form.

_addSelectionField(string $ID, string $name, string $orderby) : void

The selection field is used to select a record from a database, using a drop down menu.

Parameters

$ID

string

Name of ID column (index)

$name

string

Name of name column (caption)

$orderby

string

SQL column name to order by

 Properties

 

$data : array
Inherited
access public
inherited_from \Formaid_Form::$$data
 

$filename : string
Inherited
access public
inherited_from \Formaid_Form::$$filename
 

$message : string
Inherited
access public
inherited_from \Formaid_Form::$$message
 

$privileges : array
Inherited
access public
inherited_from \Formaid_Form::$$privileges
 

$return_url : string
Inherited
access public
inherited_from \Formaid_Form::$$return_url
 

$sql_table : string
Inherited
access public
inherited_from \Formaid_Form::$$sql_table
 

$title : string
Inherited
access public
inherited_from \Formaid_Form::$$title
 

$db_connection : object
Inherited
access protected
inherited_from \Formaid_Form::$$db_connection
 

$encoding : string
Inherited
access protected
inherited_from \Formaid_Form::$$encoding