Forms

jQuery Mobile provides a complete set of finger-friendly form elements that are based on native HTML form elements.

Form structure

All forms should be wrapped in a form tag that has an action and method that will handle the form data processing on the server.

<form action="form.php" method="post"> ... </form>

Grouping elements

To group the label and form element together for styling, we recommend wrapping a div or fieldset with the data-role="fieldcontain" attribute. The framework will add a thin vertical line above this container to separate it visually from the next field.

				
<div data-role="fieldcontain">
	...label/input code goes here...
</div>