<input>
.
Eg:
[html]
<div class="ui-field-contain">
<label for="fname">FULL NAME:</label>
<input type="text" name="fname" id="fname">
<label for="dob">DOB:</label>
<input type="date" name="dob" id="dob">
<label for="email">EMAIL:</label>
<input type="email" name="email" id="email">
</div>
[/html] <textarea>
which expands automatically expand to fit newly entered text.
Eg:
[html]<label for="about">ABOUT ME:</label>
<textarea name="about" id="about"></textarea>[/html] input type="search"
to search using a text field.
Eg:
[html]<label for="search">Search:</label>
<input type="search" name="search" id="search">[/html] <input type="radio">
and a respective label and bind the radio buttons inside a element <fieldset>
along with data-role="controlgroup"
, to bring the buttons together.To display a caption for the <fieldset>
add <legend>
element inside <fieldset>
.
Eg:
[html]
<fieldset data-role="controlgroup">
<legend>GENDER(Choosing only one):</legend>
<label for="male">Male</label>
<input type="radio" name="gender" id="male" value="male">
<label for="female">Female</label>
<input type="radio" name="gender" id="female" value="female">
</fieldset>
[/html] data-type="horizontal"
. The field container can also be wrapped around the <fieldset>
.
Eg:
[html]
<fieldset data-role="controlgroup" data-type="horizontal">
<legend>SKILL(Choose many):</legend>
<label for="java">JAVA</label>
<input type="checkbox" name="java" id="java" value="java">
<label for=".net">.NET</label>
<input type="checkbox" name=".net" id=".net" value=".net">
<label for="c++">C++</label>
<input type="checkbox" checked="" name="c++" id="c++" value="c++">
</fieldset>
[/html]
To make one of the option appear by default,use following code.
Eg:
[html]<input type="radio" checked="">
<input type="checkbox" checked="">[/html]
A form can also be placed inside a popup.Below is the code.
Eg:
[html]<a href="#popup1" data-rel="popup" class="ui-btn ui-btn-inline">Show Form</a>
<div data-role="popup" id="popup1" class="ui-content">
<div>
<h3>Login information</h3>
<label for="uname" class="ui-hidden-accessible">Username:</label>
<input type="text" name="uname" id="uname" placeholder="Username">
<label for="pwd" class="ui-hidden-accessible">Password:</label>
<input type="password" name="pwd" id="pwd" placeholder="Password">
</div>
</div>
[/html]