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( $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, $fid = null )
A utility function for a hidden field within a data entry table |
public
string
|
#
_ParseAttributes( $ftype = '', $attributes = '' )
Internal function for parsing the type extra on a field. |
public
string
|
#
DataEntryField( $format, $ftype = '', $base_fname = '', $attributes = '', $prefix = '' )
A utility function for a data entry line within a table |
public
string
|
#
SubmitButton( $fname, $fvalue, $attributes = '' )
A utility function for a submit button within a data entry table |
public
string
|
#
DataEntryLine( $prompt, $field_format, $ftype = '', $fname = '', $attributes = '', $prefix = '' )
A utility function for a data entry line within a table |
public
string
|
#
MultiEntryLine( $prompt_options, $prompt_name, $default_prompt, $format, $ftype, $fname, $attributes, $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 |