Adds the ability to add a variable value to a select form element based on another form elements value
Add the option 'variableSelect' in the model definition of that field to activate. It takes the following options in an array: source: REQUIRED string The fieldname of the element on which the base the new values baseQuery: REQUIRED string The query to calculate the new values.
disabledEmpty: boolean if the value of the source is empty, the target form element is disabled ajax: Array The controller and action of an ajax option which does the new calculation directly on change firstValue multi Set one or multiple first values to prepend the new option values true: an empty value is added false: nothing will be added array: key=>value = optionValue=>label
TODO:
package | Gems |
---|---|
subpackage | Snippets |
copyright | Copyright (c) 2011 Erasmus MC |
license | New BSD License |
since | Class available since version 1.6.3 |
inherited_from | \Gems_Snippets_ModelFormSnippetGeneric |
afterRegistry() : void
beforeDisplay() : \Zend_Form
Here we add the table display to the form.
\Zend_Form
checkRegistryRequestsAnswers() : boolean
boolean
False if required are missing.getHtmlOutput(\Zend_View_Abstract $view) : \MUtil_Html_HtmlInterface
This is a stub function either override getHtmlOutput() or override render()
\Zend_View_Abstract
Just in case it is needed here
\MUtil_Html_HtmlInterface
Something that can be renderedgetHtmlOutput(\Zend_View_Abstract $view) : \MUtil_Html_HtmlInterface
This is a stub function either override getHtmlOutput() or override render()
\Zend_View_Abstract
Just in case it is needed here
\MUtil_Html_HtmlInterface
Something that can be renderedgetTopic(integer $count = 1
) : \$string
integer
\$string
addAjaxEvent($target, $selectOptions)
addFormElements(\MUtil_Model_Bridge_FormBridgeInterface $bridge, \MUtil_Model_ModelAbstract $model)
addFormElements(\MUtil_Model_Bridge_FormBridgeInterface $bridge, \MUtil_Model_ModelAbstract $model)
Overrule this function to add different elements to the browse table, without having to recode the core table building code.
\MUtil_Model_Bridge_FormBridgeInterface
\MUtil_Model_ModelAbstract
addSaveButton()
As the save button is not part of the model - but of the interface - it does deserve it's own function.
afterSave(integer $changed)
When not rerouted, the form will be populated afterwards
integer
The number of changed rows (0 or 1 usually, but can be more)
createForm(mixed $options = null
) : \Zend_Form
mixed
\Zend_Form
createModel() : \MUtil_Model_ModelAbstract
\MUtil_Model_ModelAbstract
getAjaxEventScript()
getKeyValueArray($array)
getMenuList() : \Gems_Menu_MenuList
\Gems_Menu_MenuList
getTitle() : string
string
setAfterSaveRoute() : \Gems_Snippets_ModelFormSnippetAbstract
\Gems_Snippets_ModelFormSnippetAbstract
$accesslog : \Gems_AccessLog
$ajaxEvents
$class : string
'formTable'
$db
$formTitle : string
$model : \MUtil_Model_ModelAbstract
$project : \Gems_Project_ProjectSettings
$routeAction : string
'show'
$topicCallable : callable
$useTabbedForm : boolean
false
$util