Andrew's Web Libraries (AWL) 0.64
Loading...
Searching...
No Matches
EntryForm Class Reference

Public Member Functions

 __construct ( $action, &$record, $editing=false)
 PopulateForm (&$record, $prefix="")
 NoHelp ()
 HelpInLine ()

Static Public Member Functions

 HelpInCell ()

Public Attributes

 $action
 $record
 $EditMode
 $name
 $class
 $break_line_format
 $table_line_format
 $saved_line_format

Detailed Description

Definition at line 334 of file DataEntry.php.

Constructor & Destructor Documentation

◆ __construct()

EntryForm::__construct ( $action,
& $record,
$editing = false )

#- Initialise a new data-entry form.

Parameters
string$actionThe action when the form is submitted.
objectref$recordA reference to the database object we are displaying / editing.
boolean$editmodeWhether we are editing.

Definition at line 394 of file DataEntry.php.

Member Function Documentation

◆ HelpInCell()

EntryForm::HelpInCell ( )
static

Set the line format to have help displayed in it's own separate cell

Set the line format to a temporary one that we can revert from.

Parameters
string$new_formatThe (optional) new format we will temporarily use.

Revert the line format to what was in place before the last TempLineFormat call.

Start the actual HTML form. Return the fragment to do this.

Parameters
array$extra_attributesExtra key/value pairs for the FORM tag.
Returns
string The HTML fragment for the start of the form.

Return the HTML fragment to end the form.

Returns
string The HTML fragment to end the form.

A utility function for a heading line within a data entry table

Returns
string The HTML fragment to end the form.

A utility function for a hidden field within a data entry table

Parameters
string$fnameThe name of the field.
string$fvalueThe value of the field.
Returns
string The HTML fragment for the hidden field.

Internal function for parsing the type extra on a field.

If the '_help' attribute is not set it will be assigned the value of the 'title' attribute, if there is one.

If the 'class' attribute is not set it will be assigned to 'flookup', 'fselect', etc, according to the field type.

Returns
string The parsed type extra.

A utility function for a data entry line within a table

Returns
string The HTML fragment to display the data entry field

For some forms we prefix the field name with xxxx so it doesn't collide with the real DB field name.

If it is a date, then format it according to the current user's date format type

A utility function for a submit button within a data entry table

Returns
string The HTML fragment to display a submit button for the form.

A utility function for a data entry line within a table

Returns
string The HTML fragment to display the prompt and field.

A utility function for a data entry line, where the prompt is a drop-down.

Returns
string The HTML fragment for the drop-down prompt and associated entry field.

Definition at line 434 of file DataEntry.php.

◆ HelpInLine()

EntryForm::HelpInLine ( )

Set the line format to have help displayed in the same cell as the entry field.

Definition at line 426 of file DataEntry.php.

◆ NoHelp()

EntryForm::NoHelp ( )

Set the line format to have no help display

Definition at line 418 of file DataEntry.php.

◆ PopulateForm()

EntryForm::PopulateForm ( & $record,
$prefix = "" )

Initialise some more of the forms fields, possibly with a prefix

Parameters
objectref$recordA reference to the database object we are displaying / editing.
string$prefixA prefix to prepend to the field name.

Definition at line 408 of file DataEntry.php.

Member Data Documentation

◆ $action

EntryForm::$action

Definition at line 343 of file DataEntry.php.

◆ $break_line_format

EntryForm::$break_line_format

Definition at line 373 of file DataEntry.php.

◆ $class

EntryForm::$class

Definition at line 367 of file DataEntry.php.

◆ $EditMode

EntryForm::$EditMode

Definition at line 355 of file DataEntry.php.

◆ $name

EntryForm::$name

Definition at line 361 of file DataEntry.php.

◆ $record

EntryForm::$record

Definition at line 349 of file DataEntry.php.

◆ $saved_line_format

EntryForm::$saved_line_format

Definition at line 385 of file DataEntry.php.

◆ $table_line_format

EntryForm::$table_line_format

Definition at line 379 of file DataEntry.php.


The documentation for this class was generated from the following file: