w2ui
Home
Get started
Demos
Docs
Blog
Support
Layout
Grid
Toolbar
Sidebar
Tabs
Form
Popup
Utilities
ver 1.3
ver 1.4
ver 1.5
ver 2.0
Form
Overview
Events
Properties
Methods
Fields
Numeric
Date & Time
Drop Lists
Multi Selects
Upload
Custom
w2form.focus
Indicates what field to set focus on render.
Integer, default = 0
Once the form is rendered, and if the
.focus
property is greater or equal to 0 it will set focus to that field. If you do not want auto focus, set
.focus
to -1.
If your HTML template is defined as follows:
First Name
Last Name
Text Area
<textarea name="field_textarea" type="text" style="width: 385px; height: 80px;"></textarea>
Reset
Reset
The form definition will be:
$('#form').w2form({ name : 'form', focus : 2, fields : [ { name: 'first_name', type: 'text' }, { name: 'last_name', type: 'text' }, { name: 'field_textarea', type: 'text' } ], actions : { "reset": function () { this.clear(); }, "save": function () { this.save(); } } });
User Comments
Please enable JavaScript to view the
comments powered by Disqus.
comments powered by
Disqus