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