auFormString: Difference between revisions
Appearance
Misterhaan (talk | contribs) New page: {{RightTOC}} FormString Category:Class Category:PHP The auFormString class is part of the auLib package. It is defined in the auForm.php file. ;Hierarchy * ... |
Misterhaan (talk | contribs) →Constants: section added |
||
(2 intermediate revisions by the same user not shown) | |||
Line 11: | Line 11: | ||
==Usage== | ==Usage== | ||
This class is used to add a single-line string input field to a form. Create an object from this class and add it to an [[auFormContainer]] object. | This class is used to add a single-line string input field to a form. Create an object from this class and add it to an [[auFormContainer]] object. | ||
==Constants== | |||
* _AU_FORM_STRING_EMAIL | |||
* _AU_FORM_STRING_URL | |||
* _AU_FORM_STRING_PHONE | |||
==Public Functions== | ==Public Functions== | ||
===new auFormString=== | ===new auFormString=== | ||
<code>new auFormString($name, ''$label'', ''$tooltip'', ''$required'', ''$default'', ''$width'', ''$maxlength'')</code> | <code>new auFormString($name, ''$label'', ''$tooltip'', ''$required'', ''$default'', ''$width'', ''$maxlength'', ''$validate'')</code> | ||
Creates a new single-line string input form field. | Creates a new single-line string input form field. | ||
* $name = Name to submit the field as. | * $name = Name to submit the field as. | ||
* ''$label'' = Label to display with the field. Default is blank. | * ''$label'' = Label to display with the field. Default is blank. | ||
* ''$tooltip'' = Tooltip text to display when the mouse is over the label | * ''$tooltip'' = Tooltip text to display when the mouse is over the label. Default is none. | ||
* ''$required'' = Whether a value is required in this field. Default is not required. | * ''$required'' = Whether a value is required in this field. Default is not required. | ||
* ''$default'' = Default value for this field. Default is blank / unchecked. | * ''$default'' = Default value for this field. Default is blank / unchecked. | ||
* ''$width'' = Width of the field in characters. Default is browser default. | * ''$width'' = Width of the field in characters. Default is browser default. | ||
* ''$maxlength'' = The maximum number of characters the field can accept. Default is unlimited. | * ''$maxlength'' = The maximum number of characters the field can accept. Default is unlimited. | ||
* ''$validate'' = Format the string is expected to be. An _AU_FORM_STRING_* value. Default is any string. |
Latest revision as of 11:57, 1 February 2011
The auFormString class is part of the auLib package. It is defined in the auForm.php file.
- Hierarchy
- auFormElement
- auFormField
- auFormString
- auFormField
Usage
This class is used to add a single-line string input field to a form. Create an object from this class and add it to an auFormContainer object.
Constants
- _AU_FORM_STRING_EMAIL
- _AU_FORM_STRING_URL
- _AU_FORM_STRING_PHONE
Public Functions
new auFormString
new auFormString($name, $label, $tooltip, $required, $default, $width, $maxlength, $validate)
Creates a new single-line string input form field.
- $name = Name to submit the field as.
- $label = Label to display with the field. Default is blank.
- $tooltip = Tooltip text to display when the mouse is over the label. Default is none.
- $required = Whether a value is required in this field. Default is not required.
- $default = Default value for this field. Default is blank / unchecked.
- $width = Width of the field in characters. Default is browser default.
- $maxlength = The maximum number of characters the field can accept. Default is unlimited.
- $validate = Format the string is expected to be. An _AU_FORM_STRING_* value. Default is any string.