WTUI Docs

WTUI  1.0.0

WTUI Docs > WTUI > WTUI.Form
Search:
 
Filters

Class WTUI.Form

A Form

Tag

<wtui:form/>

The tag for WTUI.Form

Example:

<wtui:form id="exampleid">
  <wtui:formfield>
    <wtui:label text="field label"/>
    <wtui:control type="WTUI.PlainText"/>
  </wtui:formfield>
</wtui:form>
Parameters:
id <String> (optional) The id of the drop down control
type <String> (optional) A WebTemplate node type to create the form from
cmd <String> (optional) If cmd is specified, a hidden input field with name "cmd" will be added
call <object> (String) (optional) If call is specified, this function will be called on the server
hassubmitbutton <String> (optional) set to yes or no
submitbuttontext <String> the text to use for the submit button
hascancelbutton <String> (optional) set to yes or no
cancelbuttontext <String> the text to use for the cancel button
onsubmit <Function>
oncancel <Function>
onsuccess <Function>

Methods

getValues

Object getValues ( )

Get the values in the form

Returns: Object
The values in the form

reset

void reset ( )

Reset the form

Returns: void

setValues

void setValues ( value )

Set the values in the form

Parameters:
value <Object> The values
Returns: void

submit

void submit ( )

Submit the form

Returns: void

verify

boolean verify ( )

Verify the fields in the form

Returns: boolean
returns true af all the fields passed

Events

cancel

cancel ( )

This event is fired when the cancel button is pressed


submit

submit ( )

This event fires when form is submitted


success

success ( responseText )

This event fires when form has been successfully submitted

Parameters:
responseText <String> The reply from the server

WTUI