cb1bf2608248cc5d5b4a3fd8a4bbf0193ff4810c
[ReadingsJQM.git] / snippets / forms.html
1 <!--
2         jQuery Mobile Boilerplate
3         /snippets/forms.html
4 -->
5 <!doctype html>
6 <html>
7 <head>
8         <title> jQuery Mobile Boilerplate - Forms & Elements</title>
9
10         <meta charset="utf-8">
11         <meta name="viewport" content="width=device-width, initial-scale=1">
12
13         <!-- jQuery Mobile CSS bits -->
14         <link rel="stylesheet"  href="http://code.jquery.com/mobile/1.0.1/jquery.mobile-1.0.1.min.css" />
15
16         <!-- if you have a custom theme, add it here -->
17         <link rel="stylesheet"  href="/themes/jQuery-Mobile-Boilerplate.css" />
18
19         <!-- Custom css -->
20         <link rel="stylesheet" href="/css/custom.css" />
21
22         <!-- Javascript includes -->
23         <script src="http://code.jquery.com/jquery-1.6.4.min.js"></script>
24         <script src="/js/mobileinit.js"></script>
25         <script src="http://code.jquery.com/mobile/1.0.1/jquery.mobile-1.0.1.min.js"></script>
26         <script src="/js/application.js"></script>
27 </head> 
28 <body> 
29         <div data-role="page">
30
31                 <div data-role="header">
32                         <a href="../index.html" data-icon="home">Home</a>
33                         <h1>Forms & Elements</h1>
34                 </div>
35
36                 <div data-role="content">
37
38
39
40
41 <form action="#" method="get">
42
43         <h2>Form elements</h2>
44
45         <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>
46
47         <p>Browsers that don't support the custom controls will still deliver a usable experience, because all are based on native form elements.</p>
48
49         <div data-role="fieldcontain">
50                 <label for="name">Text Input:</label>
51                 <input type="text" name="name" id="name" value=""  />
52         </div>
53
54         <div data-role="fieldcontain">
55                 <label for="textarea">Textarea:</label>
56                 <textarea cols="40" rows="8" name="textarea" id="textarea"></textarea>
57         </div>
58
59         <div data-role="fieldcontain">
60                 <label for="search">Search Input:</label>
61                 <input type="search" name="password" id="search" value=""  />
62         </div>
63
64         <div data-role="fieldcontain">
65                 <label for="slider2">Flip switch:</label>
66                 <select name="slider2" id="slider2" data-role="slider">
67                         <option value="off">Off</option>
68                         <option value="on">On</option>
69                 </select>
70         </div>
71
72         <div data-role="fieldcontain">
73                 <label for="slider">Slider:</label>
74                 <input type="range" name="slider" id="slider" value="0" min="0" max="100"  />
75         </div>
76
77         <div data-role="fieldcontain">
78                 <fieldset data-role="controlgroup">
79                         <legend>Choose as many snacks as you'd like:</legend>
80                         <input type="checkbox" name="checkbox-1a" id="checkbox-1a" class="custom" />
81                         <label for="checkbox-1a">Cheetos</label>
82
83                         <input type="checkbox" name="checkbox-2a" id="checkbox-2a" class="custom" />
84                         <label for="checkbox-2a">Doritos</label>
85
86                         <input type="checkbox" name="checkbox-3a" id="checkbox-3a" class="custom" />
87                         <label for="checkbox-3a">Fritos</label>
88
89                         <input type="checkbox" name="checkbox-4a" id="checkbox-4a" class="custom" />
90                         <label for="checkbox-4a">Sun Chips</label>
91                  </fieldset>
92         </div>
93
94         <div data-role="fieldcontain">
95                 <fieldset data-role="controlgroup" data-type="horizontal">
96                         <legend>Font styling:</legend>
97                         <input type="checkbox" name="checkbox-6" id="checkbox-6" class="custom" />
98                         <label for="checkbox-6">b</label>
99
100                         <input type="checkbox" name="checkbox-7" id="checkbox-7" class="custom" />
101                         <label for="checkbox-7"><em>i</em></label>
102
103                         <input type="checkbox" name="checkbox-8" id="checkbox-8" class="custom" />
104                         <label for="checkbox-8">u</label>
105                 </fieldset>
106         </div>
107
108         <div data-role="fieldcontain">
109                 <fieldset data-role="controlgroup">
110                         <legend>Choose a pet:</legend>
111                         <input type="radio" name="radio-choice-1" id="radio-choice-1" value="choice-1" checked="checked" />
112                         <label for="radio-choice-1">Cat</label>
113
114                         <input type="radio" name="radio-choice-1" id="radio-choice-2" value="choice-2"  />
115                         <label for="radio-choice-2">Dog</label>
116
117                         <input type="radio" name="radio-choice-1" id="radio-choice-3" value="choice-3"  />
118                         <label for="radio-choice-3">Hamster</label>
119
120                         <input type="radio" name="radio-choice-1" id="radio-choice-4" value="choice-4"  />
121                         <label for="radio-choice-4">Lizard</label>
122                 </fieldset>
123         </div>
124
125         <div data-role="fieldcontain">
126                 <fieldset data-role="controlgroup" data-type="horizontal">
127                         <legend>Layout view:</legend>
128                         <input type="radio" name="radio-choice-b" id="radio-choice-c" value="on" checked="checked" />
129                         <label for="radio-choice-c">List</label>
130                         <input type="radio" name="radio-choice-b" id="radio-choice-d" value="off" />
131                         <label for="radio-choice-d">Grid</label>
132                         <input type="radio" name="radio-choice-b" id="radio-choice-e" value="other" />
133                         <label for="radio-choice-e">Gallery</label>
134                 </fieldset>
135         </div>
136
137         <div data-role="fieldcontain">
138                 <label for="select-choice-1" class="select">Choose shipping method:</label>
139                 <select name="select-choice-1" id="select-choice-1">
140                         <option value="standard">Standard: 7 day</option>
141                         <option value="rush">Rush: 3 days</option>
142                         <option value="express">Express: next day</option>
143                         <option value="overnight">Overnight</option>
144                 </select>
145         </div>
146
147         <div data-role="fieldcontain">
148                 <label for="select-choice-3" class="select">Your state:</label>
149                 <select name="select-choice-3" id="select-choice-3">
150                         <option value="AL">Alabama</option>
151                         <option value="AK">Alaska</option>
152                         <option value="AZ">Arizona</option>
153                         <option value="AR">Arkansas</option>
154                         <option value="CA">California</option>
155                         <option value="CO">Colorado</option>
156                         <option value="CT">Connecticut</option>
157                         <option value="DE">Delaware</option>
158                         <option value="FL">Florida</option>
159                         <option value="GA">Georgia</option>
160                         <option value="HI">Hawaii</option>
161                         <option value="ID">Idaho</option>
162                         <option value="IL">Illinois</option>
163                         <option value="IN">Indiana</option>
164                         <option value="IA">Iowa</option>
165                         <option value="KS">Kansas</option>
166                         <option value="KY">Kentucky</option>
167                         <option value="LA">Louisiana</option>
168                         <option value="ME">Maine</option>
169                         <option value="MD">Maryland</option>
170                         <option value="MA">Massachusetts</option>
171                         <option value="MI">Michigan</option>
172                         <option value="MN">Minnesota</option>
173                         <option value="MS">Mississippi</option>
174                         <option value="MO">Missouri</option>
175                         <option value="MT">Montana</option>
176                         <option value="NE">Nebraska</option>
177                         <option value="NV">Nevada</option>
178                         <option value="NH">New Hampshire</option>
179                         <option value="NJ">New Jersey</option>
180                         <option value="NM">New Mexico</option>
181                         <option value="NY">New York</option>
182                         <option value="NC">North Carolina</option>
183                         <option value="ND">North Dakota</option>
184                         <option value="OH">Ohio</option>
185                         <option value="OK">Oklahoma</option>
186                         <option value="OR">Oregon</option>
187                         <option value="PA">Pennsylvania</option>
188                         <option value="RI">Rhode Island</option>
189                         <option value="SC">South Carolina</option>
190                         <option value="SD">South Dakota</option>
191                         <option value="TN">Tennessee</option>
192                         <option value="TX">Texas</option>
193                         <option value="UT">Utah</option>
194                         <option value="VT">Vermont</option>
195                         <option value="VA">Virginia</option>
196                         <option value="WA">Washington</option>
197                         <option value="WV">West Virginia</option>
198                         <option value="WI">Wisconsin</option>
199                         <option value="WY">Wyoming</option>
200                 </select>
201         </div>
202
203         <div data-role="fieldcontain">
204                 <label for="select-choice-a" class="select">Choose shipping method:</label>
205                 <select name="select-choice-a" id="select-choice-a" data-native-menu="false">
206                         <option>Custom menu example</option>
207                         <option value="standard">Standard: 7 day</option>
208                         <option value="rush">Rush: 3 days</option>
209                         <option value="express">Express: next day</option>
210                         <option value="overnight">Overnight</option>
211                 </select>
212         </div>
213
214         <div class="ui-body ui-body-b">
215                 <fieldset class="ui-grid-a">
216                         <div class="ui-block-a"><button type="submit" data-theme="d">Cancel</button></div>
217                         <div class="ui-block-b"><button type="submit" data-theme="a">Submit</button></div>
218                 </fieldset>
219         </div>
220 </form>
221
222
223
224
225                 </div>
226                 
227                 <div data-role="footer" data-theme="c">
228                         <p>&copy; 2012 - jQuery Mobile Boilerplate</p>
229                 </div>  
230                 
231         </div>
232 </body>
233 </html>