A wrapper for HTML Form Elements.
Technical note: Since PHOCOA depends on knowing the button that was used to submit the form to call the correct action method, things can get tricky because browsers will "guess" which button is the default button if a user presses RETURN/ENTER in a single-line field.
Firefox and Safari seem to "guess" somehow which is the default button, even if there is more than one button. I am not sure how they decide which, but they do.
IE on the other hand, does NOT select a default button, yet it still submits the form, WITHOUT ANY SUBMIT INFO. Thus this caused PHOCOA errors since PHOCOA didn't call the expected action. Basically phocoa would have a submitted form, but then no action would be called. This is never supposed to happen, and caused some phocoa modules to have unexpected results.
To fix this, WFForm has a concept of a defaultSubmitID. This is the ID of the button that should be used as the default action. If your form has exactly one submit button, the default button will be automatically selected. Otherwise, you'll need to specify it by configuring a defaultSubmitID for your form. What this means in practice is that if you have a form with 2+ buttons, you really should set a defaultSubmitID to avoid bugs in some browsers.
WFForm features built-in CSRF protection for form submissions, ajax form submissions, and WFAppcelerator service requests.
Located in /framework/widgets/WFForm.php (line 30)
WFObject | --WFView | --WFWidget | --WFForm
| Class | Description |
|---|---|
| WFAutoForm | An automatic rendering form subclass of WFForm. |
| WFPostletUpload | A Java upload widget for our framework. |
Inherited from WFWidget
WFWidget::$bindings
WFWidget::$class
WFWidget::$errors
WFWidget::$formatter
WFWidget::$hasRestoredState
WFWidget::$hidden
WFWidget::$name
WFWidget::$value
WFWidget::$widgetLabel
Inherited from WFView
WFView::$children
WFView::$cssImports
WFView::$enabled
WFView::$id
WFView::$importInHead
WFView::$jsActions
WFView::$jsEvents
WFView::$jsImports
WFView::$page
WFView::$parent
Constructor.
Sets up the smarty object for this module.
Inherited From WFWidget
WFWidget::__construct()
WFWidget::addError()
WFWidget::bind()
WFWidget::bindingByName()
WFWidget::bindings()
WFWidget::canPushValueBinding()
WFWidget::errors()
WFWidget::exposedBindings()
WFWidget::exposedProperties()
WFWidget::formattedValue()
WFWidget::formatter()
WFWidget::hasRestoredState()
WFWidget::hidden()
WFWidget::name()
WFWidget::processBindingOptions()
WFWidget::propagateValueToBinding()
WFWidget::pullBindings()
WFWidget::pushBindings()
WFWidget::restoreState()
WFWidget::setFormatter()
WFWidget::setHidden()
WFWidget::setName()
WFWidget::setupExposedBindings()
WFWidget::setValue()
WFWidget::setWidgetLabel()
WFWidget::unbind()
WFWidget::value()
WFWidget::valueForBinding()
WFWidget::widgetLabel()
Inherited From WFView
WFView::__construct()
WFView::addChild()
WFView::allConfigFinishedLoading()
WFView::children()
WFView::cloneWithID()
WFView::enabled()
WFView::exposedProperties()
WFView::getForm()
WFView::getJSActions()
WFView::getListenerJS()
WFView::getListenerJSInScriptTag()
WFView::getWidgetDir()
WFView::getWidgetWWWDir()
WFView::id()
WFView::importCSS()
WFView::importJS()
WFView::jsEndHTML()
WFView::jsStartHTML()
WFView::page()
WFView::parent()
WFView::removeChild()
WFView::render()
WFView::setEnabled()
WFView::setId()
WFView::setJSonBlur()
WFView::setJSonClick()
WFView::setListener()
WFView::setOnEvent()
WFView::setParent()
WFView::yuiPath()
Inherited From WFObject
WFObject::__construct()
WFObject::exposedProperties()
WFObject::getClass()
WFObject::keyPathToTargetAndKey()
WFObject::setValueForKey()
WFObject::setValueForKeyPath()
WFObject::validateValueForKey()
WFObject::validateValueForKeyPath()
WFObject::valueForKey()
WFObject::valueForKeyPath()
WFObject::valueForUndefinedKey()
WFObject::__toString()
Documentation generated on Thu, 17 Apr 2008 13:51:44 -0400 by phpDocumentor 1.4.1