Render a Form as a table just by modifying the decorators
package | Gems |
---|---|
subpackage | Form |
copyright | Copyright (c) 2011 Erasmus MC |
license | New BSD License |
since | Class available since version 1.4 |
inherited_from | \Gems_Form |
__construct(mixed $options = null
) : void
Registers form view helper as decorator
mixed
activateBootstrap()
activateJQuery() : \MUtil_Form
\MUtil_Form
(continuation pattern)addDisplayGroup(array $elements, string $name, array $options = null
) : \Gems_Form_TabSubForm
This allows to render multiple fields in one table cell. Provide a description to set the label for the group. When the special option showLabels is set to true, inside the tabel cell all fields will still show their own label.
Example:
$this->addDisplayGroup(array('firstname', 'infix', 'lastname'), 'name_group', array('description'=>'Name', 'showLabels'=>true);
This would result in a two cell table row, with first cell the description of the group 'Name' and in the
second cell the three input boxes, with their label in front. If you leave the showLabels out, you will get
just three inputboxes for the name parts.
array
Array with names of the fields you want to add
string
The (unique) name for this new group
array
An array of key=>value options to set for the group
\Gems_Form_TabSubForm
addElement(string|\Zend_Form_Element $element, string $name= null
, array|\Zend_Config $options= null
) : \Zend_Form
$element may be either a string element type, or an object of type \Zend_Form_Element. If a string element type is provided, $name must be provided, and $options may be optionally provided for configuring the element.
If a \Zend_Form_Element is provided, $name may be optionally provided, and any provided $options will be ignored.
string
\Zend_Form_Element
string
array
\Zend_Config
\Zend_Form_Exception |
on invalid element |
---|
\Zend_Form
(continuation pattern)doRow($content, $label, $class, $element)
doRowDisplayGroup($content, $element, array $options)
doRowElement(string $content, \Zend_Form_Element $element, array $options) : string
string
\Zend_Form_Element
array
string
fixDecorators()
getAutoSubmit() : array
array
or nullisAutoSubmit() : boolean
boolean
loadDefaultDecorators() : void
render(\Zend_View_Interface $view = null
) : string
\Zend_View_Interface
string
setAutoSubmit(mixed $submitUrl, mixed $targetId, $selective = false
)
mixed
Url as \MUtil_Html_UrlArrayAttribute, array or string
mixed
Id of html element whose content is replaced by the submit result: \MUtil_Html_ElementInterface or string
_activateJQueryView(\Zend_View_Interface $view = null
)
_fixDecoratorDisplayGroup($element)
_fixDecoratorElement($element)
_fixDecoratorHiddenSubmit($element)
_fixDecoratorHtml($element)
_enableAutoSubmitElement(mixed $element)
Call only when $_autoSubmit is set
mixed
_getImportantDecorator(\Zend_Form_Element $element) : null | \Zend_Form_Decorator_Abstract
\Zend_Form_Element
null
\Zend_Form_Decorator_Abstract
$_autosubmit : array
null
$_isArray : boolean
false
$_alternate
null