Base form class with extensions for correct load paths, autosubmit forms and registry use.

package Gems
subpackage Form
copyright Copyright (c) 2011 Erasmus MC
license New BSD License
since Class available since version 1.0

 Methods

Constructor

__construct(mixed $options = null) : void

Registers form view helper as decorator

Parameters

$options

mixed

activateBootstrap()

activateBootstrap() 

Activate JQuery for this form

activateJQuery() : \MUtil_Form

Returns

\MUtil_Form(continuation pattern)

Add a new element

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.

Parameters

$element

string\Zend_Form_Element

$name

string

$options

array\Zend_Config

Exceptions

\Zend_Form_Exception on invalid element

Returns

\Zend_Form(continuation pattern)

Get the autosubmit arguments (if any)

getAutoSubmit() : array

Returns

arrayor null

Is this a form that autosubmits?

isAutoSubmit() : boolean

Returns

boolean

Change the form into an autosubmit form

setAutoSubmit(mixed $submitUrl, mixed $targetId, $selective = false

Parameters

$submitUrl

mixed

Url as \MUtil_Html_UrlArrayAttribute, array or string

$targetId

mixed

Id of html element whose content is replaced by the submit result: \MUtil_Html_ElementInterface or string

$selective

_activateJQueryView()

_activateJQueryView(\Zend_View_Interface $view = null

Parameters

$view

Change all elements into an autosubmit element

_enableAutoSubmitElement(mixed $element) 

Call only when $_autoSubmit is set

Parameters

$element

mixed

 Properties

 

If set this holds the url and targetid for the autosubmit

$_autosubmit : array

Default

null