Framework
3.9
|
CheckListFieldRenderer: Renders the specified list of options as a list of checkboxes from which multiple values can be selected. More...
Public Member Functions | |
CheckListFieldRenderer (&$form, $field, $label, $options, $grouped=false) | |
allowAddEntry ($text="or add new", $size=40) | |
setSize ($width, $height, $scrollAfter=0) | |
addFixedOption ($value) | |
addDefaultOption ($value) | |
getOptionCount () | |
renderField ($field) | |
FieldRenderers must override this method to provide the HTML implementation of the control used to edit the field. More... | |
renderScript ($field) | |
FieldRenderers can override this method to provide any Javascript that their control requires for an edit form. More... | |
renderReadOnly ($field) | |
renderSearchScript ($field, $mode) | |
FieldRenderers can override this method to provide any Javascript that the control requires when being used in a search form. More... | |
renderSearchField ($field, $mode) | |
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... | |
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... | |
addValidatorsToForm ($field, $required=false) | |
This method is called by the AutoForm to add any default input validators that are required by the FieldRenderer. 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... | |
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 | |
$options | |
$addEntry | |
$addEntryText | |
$grouped | |
$addEntrySize = 20 | |
$width | |
$height | |
$resizable = false | |
$nobr = false | |
$dropdown | |
$dropdownMaxWidth = "340px" | |
$dropdownMessage = "Click to Select Terms" | |
$showSelectAll = false | |
$separator = ", " | |
The separator between values in read only list. More... | |
$fixedOptions = array() | |
$defaultOptions = array() | |
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... | |
CheckListFieldRenderer: Renders the specified list of options as a list of checkboxes from which multiple values can be selected.
The results are stored in the associated field as a comma-separated list of values.
obj | $form | the AutoForm object, passed by reference |
string | $field | the name of the field defined in the dataitem class object in the datamodel folder whose values can be changed by the checkbox list This field name should match the field name in the database. |
string | $label | presented on the form to the user to describe the list |
array | $options | defines the list of options available, as follows: $options = array ( 1 => "Option 1", 2 => "Option 2", 3 => "Option 3" ) For grouped lists, the structure would be: $options = array("Group 1" => array( 1 => "Option 1", 2 => "Option 2"), "Group 2" => array( 3 => "Option 3")); |
boolean | $grouped | specifies whether the array defines a grouping structure for the checkbox list. The default is false. |
Definition at line 73 of file checklist_field_renderer.inc.
CheckListFieldRenderer::addDefaultOption | ( | $value | ) |
Definition at line 134 of file checklist_field_renderer.inc.
CheckListFieldRenderer::addFixedOption | ( | $value | ) |
Definition at line 127 of file checklist_field_renderer.inc.
CheckListFieldRenderer::allowAddEntry | ( | $text = "or add new" , |
|
$size = 40 |
|||
) |
Definition at line 109 of file checklist_field_renderer.inc.
CheckListFieldRenderer::CheckListFieldRenderer | ( | & | $form, |
$field, | |||
$label, | |||
$options, | |||
$grouped = false |
|||
) |
Definition at line 93 of file checklist_field_renderer.inc.
CheckListFieldRenderer::getOptionCount | ( | ) |
Definition at line 141 of file checklist_field_renderer.inc.
CheckListFieldRenderer::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 452 of file checklist_field_renderer.inc.
CheckListFieldRenderer::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 155 of file checklist_field_renderer.inc.
CheckListFieldRenderer::renderReadOnly | ( | $field | ) |
Definition at line 310 of file checklist_field_renderer.inc.
CheckListFieldRenderer::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 268 of file checklist_field_renderer.inc.
CheckListFieldRenderer::renderSearchField | ( | $field, | |
$mode | |||
) |
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 369 of file checklist_field_renderer.inc.
CheckListFieldRenderer::renderSearchScript | ( | $field, | |
$mode | |||
) |
FieldRenderers can override this method to provide any Javascript that the control requires when being used in a search form.
string | $field | the field name |
string | $mode | the search mode for the specific field ('equal', 'like', 'from', 'to', 'range') |
Reimplemented from FieldRenderer.
Definition at line 361 of file checklist_field_renderer.inc.
CheckListFieldRenderer::setSize | ( | $width, | |
$height, | |||
$scrollAfter = 0 |
|||
) |
Definition at line 118 of file checklist_field_renderer.inc.
CheckListFieldRenderer::$addEntry |
Definition at line 76 of file checklist_field_renderer.inc.
CheckListFieldRenderer::$addEntrySize = 20 |
Definition at line 79 of file checklist_field_renderer.inc.
CheckListFieldRenderer::$addEntryText |
Definition at line 77 of file checklist_field_renderer.inc.
CheckListFieldRenderer::$defaultOptions = array() |
Definition at line 91 of file checklist_field_renderer.inc.
CheckListFieldRenderer::$dropdown |
Definition at line 84 of file checklist_field_renderer.inc.
CheckListFieldRenderer::$dropdownMaxWidth = "340px" |
Definition at line 85 of file checklist_field_renderer.inc.
CheckListFieldRenderer::$dropdownMessage = "Click to Select Terms" |
Definition at line 86 of file checklist_field_renderer.inc.
CheckListFieldRenderer::$fixedOptions = array() |
Definition at line 90 of file checklist_field_renderer.inc.
CheckListFieldRenderer::$grouped |
Definition at line 78 of file checklist_field_renderer.inc.
CheckListFieldRenderer::$height |
Definition at line 81 of file checklist_field_renderer.inc.
CheckListFieldRenderer::$nobr = false |
Definition at line 83 of file checklist_field_renderer.inc.
CheckListFieldRenderer::$options |
Definition at line 75 of file checklist_field_renderer.inc.
CheckListFieldRenderer::$resizable = false |
Definition at line 82 of file checklist_field_renderer.inc.
CheckListFieldRenderer::$separator = ", " |
The separator between values in read only list.
Definition at line 88 of file checklist_field_renderer.inc.
CheckListFieldRenderer::$showSelectAll = false |
Definition at line 87 of file checklist_field_renderer.inc.
CheckListFieldRenderer::$width |
Definition at line 80 of file checklist_field_renderer.inc.