Class EntryForm
A class to handle displaying a form on the page (for editing) or a structured layout of non-editable content (for viewing), with a simple switch to flip from view mode to edit mode.
Copyright: Catalyst IT Ltd, Morphoss Ltd <http://www.morphoss.com/>
License: GNU GPL v2
Author: Andrew McMillan <andrew@mcmillan.net.nz>
Located at DataEntry.php
public
|
|
public
|
#
PopulateForm( objectref & $record, string $prefix = "" )
Initialise some more of the forms fields, possibly with a prefix |
public
|
|
public
|
|
public
|
|
public
|
#
SimpleForm( mixed $new_format = '<span class="prompt">%s:</span> <span class="entry">%s</span>' )
Set the line format to an extremely simple CSS based prompt / field layout. |
public
|
#
TempLineFormat( string $new_format = '<span class="prompt">%s:</span> <span class="entry">%s</span>' )
Set the line format to a temporary one that we can revert from. |
public
|
#
RevertLineFormat( )
Revert the line format to what was in place before the last TempLineFormat call. |
public
string
|
|
public
string
|
|
public
string
|
|
public
string
|
#
HiddenField( string $fname, string $fvaluei, mixed $fid = null )
A utility function for a hidden field within a data entry table |
public
string
|
#
_ParseAttributes( mixed $ftype = '', mixed $attributes = '' )
Internal function for parsing the type extra on a field. |
public
string
|
#
DataEntryField( mixed $format, mixed $ftype = '', mixed $base_fname = '', mixed $attributes = '', mixed $prefix = '' )
A utility function for a data entry line within a table |
public
string
|
#
SubmitButton( mixed $fname, mixed $fvalue, mixed $attributes = '' )
A utility function for a submit button within a data entry table |
public
string
|
#
DataEntryLine( mixed $prompt, mixed $field_format, mixed $ftype = '', mixed $fname = '', mixed $attributes = '', mixed $prefix = '' )
A utility function for a data entry line within a table |
public
string
|
#
MultiEntryLine( mixed $prompt_options, mixed $prompt_name, mixed $default_prompt, mixed $format, mixed $ftype = '', mixed $fname = '', mixed $attributes = '', mixed $prefix )
A utility function for a data entry line, where the prompt is a drop-down. |
public
string
|
$action |
|
#
The submit action for the form |
public
string
|
$record |
|
#
The record that the form is dealing with |
public
string
|
$EditMode |
|
#
Whether we are editing, or not |
public
string
|
$name |
|
#
The name of the form |
public
string
|
$class |
|
#
The CSS class of the form |
public
string
|
$break_line_format |
|
#
Format string for lines that are breaks in the data entry field groupings |
public
string
|
$table_line_format |
|
#
Format string for normal data entry field lines. |
public
string
|
$saved_line_format |
|
#
Format string that has been temporarily saved so we can restore it later |