forms-all.html 9.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="utf-8">
  5. <meta name="viewport" content="width=device-width, initial-scale=1">
  6. <title>jQuery Mobile Docs - Gallery of Form Controls</title>
  7. <link rel="stylesheet" href="../../jquery.mobile-1.0.1.min.css" />
  8. <link rel="stylesheet" href="../_assets/css/jqm-docs.css"/>
  9. <script src="../../jquery.js"></script>
  10. <script src="../../experiments/themeswitcher/jquery.mobile.themeswitcher.js"></script>
  11. <script src="../_assets/js/jqm-docs.js"></script>
  12. <script src="../../jquery.mobile-1.0.1.min.js"></script>
  13. </head>
  14. <body>
  15. <div data-role="page" class="type-interior">
  16. <div data-role="header" data-theme="f">
  17. <h1>Forms</h1>
  18. <a href="../../" data-icon="home" data-iconpos="notext" data-direction="reverse" class="ui-btn-right jqm-home">Home</a>
  19. </div><!-- /header -->
  20. <div data-role="content">
  21. <div class="content-primary">
  22. <form action="#" method="get">
  23. <h2>Form elements</h2>
  24. <p>This page contains various progressive-enhancement driven form controls. Native elements are sometimes hidden from view, but their values are maintained so the form can be submitted normally. </p>
  25. <p>Browsers that don't support the custom controls will still deliver a usable experience, because all are based on native form elements.</p>
  26. <div data-role="fieldcontain">
  27. <label for="name">Text Input:</label>
  28. <input type="text" name="name" id="name" value="" />
  29. </div>
  30. <div data-role="fieldcontain">
  31. <label for="textarea">Textarea:</label>
  32. <textarea cols="40" rows="8" name="textarea" id="textarea"></textarea>
  33. </div>
  34. <div data-role="fieldcontain">
  35. <label for="search">Search Input:</label>
  36. <input type="search" name="password" id="search" value="" />
  37. </div>
  38. <div data-role="fieldcontain">
  39. <label for="slider2">Flip switch:</label>
  40. <select name="slider2" id="slider2" data-role="slider">
  41. <option value="off">Off</option>
  42. <option value="on">On</option>
  43. </select>
  44. </div>
  45. <div data-role="fieldcontain">
  46. <label for="slider">Slider:</label>
  47. <input type="range" name="slider" id="slider" value="0" min="0" max="100" />
  48. </div>
  49. <div data-role="fieldcontain">
  50. <fieldset data-role="controlgroup">
  51. <legend>Choose as many snacks as you'd like:</legend>
  52. <input type="checkbox" name="checkbox-1a" id="checkbox-1a" class="custom" />
  53. <label for="checkbox-1a">Cheetos</label>
  54. <input type="checkbox" name="checkbox-2a" id="checkbox-2a" class="custom" />
  55. <label for="checkbox-2a">Doritos</label>
  56. <input type="checkbox" name="checkbox-3a" id="checkbox-3a" class="custom" />
  57. <label for="checkbox-3a">Fritos</label>
  58. <input type="checkbox" name="checkbox-4a" id="checkbox-4a" class="custom" />
  59. <label for="checkbox-4a">Sun Chips</label>
  60. </fieldset>
  61. </div>
  62. <div data-role="fieldcontain">
  63. <fieldset data-role="controlgroup" data-type="horizontal">
  64. <legend>Font styling:</legend>
  65. <input type="checkbox" name="checkbox-6" id="checkbox-6" class="custom" />
  66. <label for="checkbox-6">b</label>
  67. <input type="checkbox" name="checkbox-7" id="checkbox-7" class="custom" />
  68. <label for="checkbox-7"><em>i</em></label>
  69. <input type="checkbox" name="checkbox-8" id="checkbox-8" class="custom" />
  70. <label for="checkbox-8">u</label>
  71. </fieldset>
  72. </div>
  73. <div data-role="fieldcontain">
  74. <fieldset data-role="controlgroup">
  75. <legend>Choose a pet:</legend>
  76. <input type="radio" name="radio-choice-1" id="radio-choice-1" value="choice-1" checked="checked" />
  77. <label for="radio-choice-1">Cat</label>
  78. <input type="radio" name="radio-choice-1" id="radio-choice-2" value="choice-2" />
  79. <label for="radio-choice-2">Dog</label>
  80. <input type="radio" name="radio-choice-1" id="radio-choice-3" value="choice-3" />
  81. <label for="radio-choice-3">Hamster</label>
  82. <input type="radio" name="radio-choice-1" id="radio-choice-4" value="choice-4" />
  83. <label for="radio-choice-4">Lizard</label>
  84. </fieldset>
  85. </div>
  86. <div data-role="fieldcontain">
  87. <fieldset data-role="controlgroup" data-type="horizontal">
  88. <legend>Layout view:</legend>
  89. <input type="radio" name="radio-choice-b" id="radio-choice-c" value="on" checked="checked" />
  90. <label for="radio-choice-c">List</label>
  91. <input type="radio" name="radio-choice-b" id="radio-choice-d" value="off" />
  92. <label for="radio-choice-d">Grid</label>
  93. <input type="radio" name="radio-choice-b" id="radio-choice-e" value="other" />
  94. <label for="radio-choice-e">Gallery</label>
  95. </fieldset>
  96. </div>
  97. <div data-role="fieldcontain">
  98. <label for="select-choice-1" class="select">Choose shipping method:</label>
  99. <select name="select-choice-1" id="select-choice-1">
  100. <option value="standard">Standard: 7 day</option>
  101. <option value="rush">Rush: 3 days</option>
  102. <option value="express">Express: next day</option>
  103. <option value="overnight">Overnight</option>
  104. </select>
  105. </div>
  106. <div data-role="fieldcontain">
  107. <label for="select-choice-3" class="select">Your state:</label>
  108. <select name="select-choice-3" id="select-choice-3">
  109. <option value="AL">Alabama</option>
  110. <option value="AK">Alaska</option>
  111. <option value="AZ">Arizona</option>
  112. <option value="AR">Arkansas</option>
  113. <option value="CA">California</option>
  114. <option value="CO">Colorado</option>
  115. <option value="CT">Connecticut</option>
  116. <option value="DE">Delaware</option>
  117. <option value="FL">Florida</option>
  118. <option value="GA">Georgia</option>
  119. <option value="HI">Hawaii</option>
  120. <option value="ID">Idaho</option>
  121. <option value="IL">Illinois</option>
  122. <option value="IN">Indiana</option>
  123. <option value="IA">Iowa</option>
  124. <option value="KS">Kansas</option>
  125. <option value="KY">Kentucky</option>
  126. <option value="LA">Louisiana</option>
  127. <option value="ME">Maine</option>
  128. <option value="MD">Maryland</option>
  129. <option value="MA">Massachusetts</option>
  130. <option value="MI">Michigan</option>
  131. <option value="MN">Minnesota</option>
  132. <option value="MS">Mississippi</option>
  133. <option value="MO">Missouri</option>
  134. <option value="MT">Montana</option>
  135. <option value="NE">Nebraska</option>
  136. <option value="NV">Nevada</option>
  137. <option value="NH">New Hampshire</option>
  138. <option value="NJ">New Jersey</option>
  139. <option value="NM">New Mexico</option>
  140. <option value="NY">New York</option>
  141. <option value="NC">North Carolina</option>
  142. <option value="ND">North Dakota</option>
  143. <option value="OH">Ohio</option>
  144. <option value="OK">Oklahoma</option>
  145. <option value="OR">Oregon</option>
  146. <option value="PA">Pennsylvania</option>
  147. <option value="RI">Rhode Island</option>
  148. <option value="SC">South Carolina</option>
  149. <option value="SD">South Dakota</option>
  150. <option value="TN">Tennessee</option>
  151. <option value="TX">Texas</option>
  152. <option value="UT">Utah</option>
  153. <option value="VT">Vermont</option>
  154. <option value="VA">Virginia</option>
  155. <option value="WA">Washington</option>
  156. <option value="WV">West Virginia</option>
  157. <option value="WI">Wisconsin</option>
  158. <option value="WY">Wyoming</option>
  159. </select>
  160. </div>
  161. <div data-role="fieldcontain">
  162. <label for="select-choice-a" class="select">Choose shipping method:</label>
  163. <select name="select-choice-a" id="select-choice-a" data-native-menu="false">
  164. <option>Custom menu example</option>
  165. <option value="standard">Standard: 7 day</option>
  166. <option value="rush">Rush: 3 days</option>
  167. <option value="express">Express: next day</option>
  168. <option value="overnight">Overnight</option>
  169. </select>
  170. </div>
  171. <div class="ui-body ui-body-b">
  172. <fieldset class="ui-grid-a">
  173. <div class="ui-block-a"><button type="submit" data-theme="d">Cancel</button></div>
  174. <div class="ui-block-b"><button type="submit" data-theme="a">Submit</button></div>
  175. </fieldset>
  176. </div>
  177. </form>
  178. </div><!--/content-primary -->
  179. <div class="content-secondary">
  180. <div data-role="collapsible" data-collapsed="true" data-theme="b" data-content-theme="d">
  181. <h3>More in this section</h3>
  182. <ul data-role="listview" data-theme="c" data-dividertheme="d">
  183. <li data-role="list-divider">Form elements</li>
  184. <li><a href="docs-forms.html">Form basics</a></li>
  185. <li data-theme="a"><a href="forms-all.html">Form element gallery</a></li>
  186. <li><a href="textinputs/">Text inputs</a></li>
  187. <li><a href="search/">Search inputs</a></li>
  188. <li><a href="slider/">Slider</a></li>
  189. <li><a href="switch/">Flip toggle switch</a></li>
  190. <li><a href="radiobuttons/">Radio buttons</a></li>
  191. <li><a href="checkboxes/">Checkboxes</a></li>
  192. <li><a href="selects/">Select menus</a></li>
  193. <li><a href="forms-themes.html">Theming forms</a></li>
  194. <li><a href="forms-all-native.html">Native form elements</a></li>
  195. <li><a href="forms-sample.html">Submitting forms</a></li>
  196. </ul>
  197. </div>
  198. </div>
  199. </div><!-- /content -->
  200. <div data-role="footer" class="footer-docs" data-theme="c">
  201. <p>&copy; 2011-2012 The jQuery Project</p>
  202. </div>
  203. </div><!-- /page -->
  204. </body>
  205. </html>