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.
static string
_ParseAttributes
([ $ftype = ''], [ $attributes = ''])
Initialise a new data-entry form.
EntryForm
EntryForm
(string $action, &$record, [ $editing = false], objectref $record, boolean $editmode)
-
string
$action: The action when the form is submitted.
-
objectref
$record: A reference to the database object we are displaying / editing.
-
boolean
$editmode: Whether we are editing.
-
&$record
-
$editing
A utility function for a heading line within a data entry table
string
BreakLine
([ $text = ''])
A utility function for a data entry line within a table
string
DataEntryField
( $format, [ $ftype = ''], [ $base_fname = ''], [ $attributes = ''], [ $prefix = ''])
-
$format
-
$ftype
-
$base_fname
-
$attributes
-
$prefix
A utility function for a data entry line within a table
string
DataEntryLine
( $prompt, $field_format, [ $ftype = ''], [ $fname = ''], [ $attributes = ''], [ $prefix = ''])
-
$prompt
-
$field_format
-
$ftype
-
$fname
-
$attributes
-
$prefix
Return the HTML fragment to end the form.
string
EndForm
()
Set the line format to have help displayed in it's own separate cell
void
HelpInCell
()
Set the line format to have help displayed in the same cell as the entry field.
void
HelpInLine
()
A utility function for a hidden field within a data entry table
string
HiddenField
(string $fname, $fvaluei, [ $fid = null], string $fvalue)
-
string
$fname: The name of the field.
-
string
$fvalue: The value of the field.
-
$fvaluei
-
$fid
A utility function for a data entry line, where the prompt is a drop-down.
string
MultiEntryLine
( $prompt_options, $prompt_name, $default_prompt, $format, [ $ftype = ''], [ $fname = ''], [ $attributes = ''], $prefix)
-
$prompt_options
-
$prompt_name
-
$default_prompt
-
$format
-
$ftype
-
$fname
-
$attributes
-
$prefix
Set the line format to have no help display
void
NoHelp
()
Initialise some more of the forms fields, possibly with a prefix
void
PopulateForm
( &$record, [string $prefix = ""], objectref $record)
-
objectref
$record: A reference to the database object we are displaying / editing.
-
string
$prefix: A prefix to prepend to the field name.
-
&$record
Revert the line format to what was in place before the last TempLineFormat call.
void
RevertLineFormat
()
Set the line format to an extremely simple CSS based prompt / field layout.
void
SimpleForm
([ $new_format = '<span class="prompt">%s:</span> <span class="entry">%s</span>'])
Start the actual HTML form. Return the fragment to do this.
string
StartForm
([array $extra_attributes = ''])
-
array
$extra_attributes: Extra key/value pairs for the FORM tag.
A utility function for a submit button within a data entry table
string
SubmitButton
( $fname, $fvalue, [ $attributes = ''])
-
$fname
-
$fvalue
-
$attributes
Set the line format to a temporary one that we can revert from.
void
TempLineFormat
([string $new_format = '<span class="prompt">%s:</span> <span class="entry">%s</span>'])
-
string
$new_format: The (optional) new format we will temporarily use.