A form is an HTML element that allows users to send data to the server.
Mobile forms are the same thing as forms but they fit in well to a mobile device display (aspect ratio).
jQuery mobile forms are responsive forms that are styled and made dynamic with jQuery libraries.
The jQuery mobile form has the below controls:
label is required for each
form element. Set the label’s
for attribute to match the element’s
Let’s look at an example:
Lines 5 to 7: We add jQuery’s library to enable the styling.
Line 14: Our form has an attribute
data-role with the value of
controlgroup. It helps jQuery to locate the
form where the element is styled.
Note: All the check boxes have a
labelelement and the
forattribute value is the same as the name of the
This allows jQuery to uniquely identify each field.
View all Courses