inputEx - Form Usage
Basic Form creation
Use the following code to create a basic inputEx Form.
Multi-group Form
Use the following code to create a Form with multiple Groups (fieldsets).
Send in json with ajax
How to send the form data using Ajax
Send with ajax using url encoded parameters
How to send the form data using Ajax
Send with ajax using url encoded parameters wrapped in an object
Use wrapObject
Setting and getting form value
Use the following code to set or get the value from javascript
Different button types
Use the following code to create submit buttons, or "link" buttons.
You can use 3 types of inputEx form buttons :
- submit : a (<input type="submit" />)-tag is created. A handler is automatically added on 'click' to submit the form only if it validates (no invalid fields, or no empty required fields).
- submit-link : same as 'submit' type, but with a different markup (<a><span>Submit</span></a>) to render as 'link'. The same handler as with 'submit' type is added on link.
- link : same markup as 'submit-link' but with no handler to submit the form. You must add your own 'onClick' function to trigger a specific action. The default link behavior is disabled, so you don't have to do it yourself in the onClick handler.
"link" and "submit-link" buttons are also useful because :
- they allow to differenciate strong actions (like a "submit"), and weak actions (like a form "reset")
- they are easier to style (see : styling buttons example)
Destroy a form
Remove DOM nodes, remove event listeners, free memory...
Turn off / on browser autocompletion
Activate/deactivate browser autocompletion by field, by form, or for all inputEx fields in the page.