Framework
3.9
|
Field renderer for zipcode data fields. More...
Public Member Functions | |
PhoneNumberFieldRenderer (&$parent) | |
renderScript ($field) | |
FieldRenderers can override this method to provide any Javascript that their control requires for an edit form. More... | |
renderScriptOnePart ($field, $limit) | |
renderField ($field) | |
FieldRenderers must override this method to provide the HTML implementation of the control used to edit the field. More... | |
renderReadOnly ($field) | |
renderSearchField ($field, $mode="equal") | |
FieldRenderers must override this method to provide the HTML implementation of the control displayed for the field in a search form. More... | |
preProcess ($field="") | |
FieldRenderers can override this method to provide behavior that occurs prior to the saving of the parent form's target object to the database. More... | |
addValidatorsToForm ($field, $required=false) | |
This method is called by the AutoForm to add any default input validators that are required by the FieldRenderer. More... | |
format ($field) | |
Public Member Functions inherited from FieldRenderer | |
FieldRenderer ($parent) | |
Constructor. More... | |
_printLabel ($field, $colspan=1, $styles="", $annotation="") | |
Internal method to generate the HTML for the field label. More... | |
_getLabel ($field, $addSuffix=true) | |
_startField ($field, $styles="") | |
Internal method to generate the starting HTML for the field (including the label) More... | |
_endField ($field) | |
Internal method to generate the closing HTML for the field. More... | |
addSearchValidatorsToForm ($field, $mode, $required=false) | |
For SearchForm, the validator field needs to match the name tag in the form which is in the format field:mode. More... | |
formatName ($item, $name) | |
Formats the given DataItem based on the supplied format string. More... | |
renderSearchScript ($field, $mode) | |
FieldRenderers can override this method to provide any Javascript that the control requires when being used in a search form. More... | |
renderOnSubmitHandler ($field) | |
FieldRenderers can override this method to provide any Javascript that must be executed when the form is submitted on the client. More... | |
postProcess ($field="") | |
FieldRenderers can override this method to provide behavior that occurs after the parent form's target object has been saved to the database. More... | |
Public Attributes | |
$disable = false | |
$template = "standard" | |
$extension = false | |
Public Attributes inherited from FieldRenderer | |
$parent = null | |
$labelSuffix = "" | |
$colspan = 1 | |
$annotateBefore = false | |
$annotateNextLine = true | |
$hideLabel = false | |
$onPreProcess = null | |
callback hook for processing prior to saving the form's data object - individual renderers may override with custom processing More... | |
$onPostProcess = null | |
callback hook for processing after saving the form's data object - individual renderers may override with custom processing More... | |
Field renderer for zipcode data fields.
autocomplete: whether field may attempt autocompletion based on the user-entered data string.
onChange: script-defined callback function to call when user edits the field (script is called on field exit, not for each key entered)
disable: alternative to readonly; field can be reenabled thru javascript
Example: to disable input in a field, add the following line of code to your calling script: $form->getRenderer("foo")->disable = true;
Definition at line 66 of file phone_number_field_renderer.inc.
PhoneNumberFieldRenderer::addValidatorsToForm | ( | $field, | |
$required = false |
|||
) |
This method is called by the AutoForm to add any default input validators that are required by the FieldRenderer.
Fields that need custom validation or a custom required validator should override this function.
string | $field | the field name |
boolean | $required | - whether the field is required |
Reimplemented from FieldRenderer.
Definition at line 215 of file phone_number_field_renderer.inc.
PhoneNumberFieldRenderer::format | ( | $field | ) |
Definition at line 235 of file phone_number_field_renderer.inc.
PhoneNumberFieldRenderer::PhoneNumberFieldRenderer | ( | & | $parent | ) |
Definition at line 72 of file phone_number_field_renderer.inc.
PhoneNumberFieldRenderer::preProcess | ( | $field = "" | ) |
FieldRenderers can override this method to provide behavior that occurs prior to the saving of the parent form's target object to the database.
For example, the FileUploadFieldRenderer overrides this method to process the uploading of the file and then store the location in the associated field in the target object.
string | $field | the field name |
Reimplemented from FieldRenderer.
Definition at line 191 of file phone_number_field_renderer.inc.
PhoneNumberFieldRenderer::renderField | ( | $field | ) |
FieldRenderers must override this method to provide the HTML implementation of the control used to edit the field.
string | $field | the field name |
Reimplemented from FieldRenderer.
Definition at line 123 of file phone_number_field_renderer.inc.
PhoneNumberFieldRenderer::renderReadOnly | ( | $field | ) |
Definition at line 160 of file phone_number_field_renderer.inc.
PhoneNumberFieldRenderer::renderScript | ( | $field | ) |
FieldRenderers can override this method to provide any Javascript that their control requires for an edit form.
string | $field | the field name |
Reimplemented from FieldRenderer.
Definition at line 77 of file phone_number_field_renderer.inc.
PhoneNumberFieldRenderer::renderScriptOnePart | ( | $field, | |
$limit | |||
) |
Definition at line 96 of file phone_number_field_renderer.inc.
PhoneNumberFieldRenderer::renderSearchField | ( | $field, | |
$mode = "equal" |
|||
) |
FieldRenderers must override this method to provide the HTML implementation of the control displayed for the field in a search form.
string | $field | the field name |
Reimplemented from FieldRenderer.
Definition at line 169 of file phone_number_field_renderer.inc.
PhoneNumberFieldRenderer::$disable = false |
Definition at line 68 of file phone_number_field_renderer.inc.
PhoneNumberFieldRenderer::$extension = false |
Definition at line 70 of file phone_number_field_renderer.inc.
PhoneNumberFieldRenderer::$template = "standard" |
Definition at line 69 of file phone_number_field_renderer.inc.