Framework
3.9
|
SelectFieldViewSourceRenderer: Renders the specified list of options as a dropdown select box with a View button to the right which would display specified popup preview. More...
Inherits SelectFieldRenderer.
Public Member Functions | |
SelectFieldViewSourceRenderer (&$form, $field, $label, $options, $callback) | |
renderScript ($field) | |
_endField ($field) | |
Public Attributes | |
$buttonLabel | |
$field | |
$callback | |
SelectFieldViewSourceRenderer: Renders the specified list of options as a dropdown select box with a View button to the right which would display specified popup preview.
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 value can be changed by the select item list box. This field name should match the field name in the database. |
string | $label | presented on the form to the user to describe the list box |
array | options defined in the dataitem class object that contains the option ids and labels for the list box For example, for action_type, create array ActionTypes as follows: actionTypes = array ( 1 => "Introduction", 2 => "Investigation", 3 => "Formal Assessment" ) | |
string | $callback | javascript function that opens the popup e.g., openMyDialog or new MyClass().openMyDialog the "()" is left off and supplied in the selection change function written by this class. |
Calling script creates an instance as follows: $myFieldSelect = new SelectFieldViewSourceRenderer($form, "field name", "Label", options array, jsFunction);
The javascript function name provided must contain a call to create the modal dialog. This function receives the select field value. Example:
myJavascriptFunction(selectFieldValue) { modalPopup('myTitle', '/action/myComponent/my_modal_dialog?mySelectField=' + selectFieldValue, '400px', 'auto', true); }
Definition at line 82 of file select_field_view_source_renderer.inc.
SelectFieldViewSourceRenderer::_endField | ( | $field | ) |
Definition at line 143 of file select_field_view_source_renderer.inc.
SelectFieldViewSourceRenderer::renderScript | ( | $field | ) |
Definition at line 107 of file select_field_view_source_renderer.inc.
SelectFieldViewSourceRenderer::SelectFieldViewSourceRenderer | ( | & | $form, |
$field, | |||
$label, | |||
$options, | |||
$callback | |||
) |
Definition at line 89 of file select_field_view_source_renderer.inc.
SelectFieldViewSourceRenderer::$buttonLabel |
Definition at line 84 of file select_field_view_source_renderer.inc.
SelectFieldViewSourceRenderer::$callback |
Definition at line 87 of file select_field_view_source_renderer.inc.
SelectFieldViewSourceRenderer::$field |
Definition at line 85 of file select_field_view_source_renderer.inc.