Tizen 2.1 base
[platform/framework/web/web-ui-fw.git] / libs / js / jquery-mobile-1.2.0 / docs / forms / forms-all-native.html
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 - Native Form Controls</title>
7         <link rel="stylesheet"  href="../../css/themes/default/jquery.mobile.css" />
8         <link rel="stylesheet" href="../_assets/css/jqm-docs.css"/>
9
10         <script src="../../js/jquery.js"></script>
11         <script src="../../docs/_assets/js/jqm-docs.js"></script>
12         <script src="../../js/"></script>
13
14 </head>
15 <body>
16
17         <div data-role="page" class="type-interior">
18
19                 <div data-role="header" data-theme="f">
20                 <h1>Forms</h1>
21                 <a href="../../" data-icon="home" data-iconpos="notext" data-direction="reverse">Home</a>
22                 <a href="../nav.html" data-icon="search" data-iconpos="notext" data-rel="dialog" data-transition="fade">Search</a>
23         </div><!-- /header -->
24
25         <div data-role="content">
26                 <div class="content-primary">
27
28                 <form action="#" method="get">
29
30                         <h2>Native form elements &amp; buttons</h2>
31
32                         <p>Although the framework automatically enhances form elements and buttons into <a href="forms-all.html">touch input optimized controls</a> to streamline development, it's easy to tell jQuery Mobile to leave these elements alone so the standard, native control can be used instead.</p>
33                         <p>Adding the <code>data-role="none"</code> attribute to any form or button element tells the framework to not apply any enhanced styles or scripting. The examples below all have this attribute in place to demonstrate the effect. You may need to write custom styles to lay out your form controls because we try to leave all the default styling intact.</p>
34                         <p>As of Version 1.1 adding the <code>data-enhance="false"</code> attribute to any container will tell the framework not to enhance any element inside. To activate this functionality, <code>$.mobile.ignoreContentEnabled</code> must be set to <code>true</code>. View <a href="../api/globalconfig.html">Configuring Defaults</a> before using it.</p>
35
36                         <div data-role="fieldcontain">
37                  <label for="name">Text Input:</label>
38                  <input type="text" name="name" id="name" value="" data-role="none" />
39                         </div>
40
41                         <div data-role="fieldcontain">
42                         <label for="textarea">Textarea:</label>
43                         <textarea cols="40" rows="8" name="textarea" id="textarea" data-role="none"></textarea>
44                         </div>
45
46                         <div data-role="fieldcontain">
47                  <label for="search">Search Input:</label>
48                  <input type="search" name="password" id="search" value="" data-role="none" />
49                         </div>
50
51                         <div data-role="fieldcontain">
52                                 <label for="slider2">Flip switch:</label>
53                                 <select name="slider2" id="slider2" data-role="none">
54                                         <option value="off">Off</option>
55                                         <option value="on">On</option>
56                                 </select>
57                         </div>
58
59                         <div data-role="fieldcontain">
60                                 <label for="slider">Slider:</label>
61                                 <input type="range" name="slider" id="slider" value="0" min="0" max="100" data-role="none" />
62                         </div>
63
64                         <div data-role="fieldcontain">
65                         <fieldset data-role="controlgroup">
66                                 <legend>Choose as many snacks as you'd like:</legend>
67                                 <input type="checkbox" name="checkbox-1a" id="checkbox-1a" class="custom" data-role="none" />
68                                 <label for="checkbox-1a">Cheetos</label>
69
70                                 <input type="checkbox" name="checkbox-2a" id="checkbox-2a" class="custom" data-role="none" />
71                                 <label for="checkbox-2a">Doritos</label>
72
73                                 <input type="checkbox" name="checkbox-3a" id="checkbox-3a" class="custom" data-role="none" />
74                                 <label for="checkbox-3a">Fritos</label>
75
76                                 <input type="checkbox" name="checkbox-4a" id="checkbox-4a" class="custom" data-role="none" />
77                                 <label for="checkbox-4a">Sun Chips</label>
78                     </fieldset>
79                         </div>
80
81                         <div data-role="fieldcontain">
82                         <fieldset data-role="controlgroup" data-type="horizontal">
83                         <legend>Font styling:</legend>
84                         <input type="checkbox" name="checkbox-6" id="checkbox-6" class="custom" data-role="none" />
85                                 <label for="checkbox-6">b</label>
86
87                                 <input type="checkbox" name="checkbox-7" id="checkbox-7" class="custom" data-role="none" />
88                                 <label for="checkbox-7"><em>i</em></label>
89
90                                 <input type="checkbox" name="checkbox-8" id="checkbox-8" class="custom" data-role="none" />
91                                 <label for="checkbox-8">u</label>
92                     </fieldset>
93                         </div>
94
95                         <div data-role="fieldcontain">
96                             <fieldset data-role="controlgroup">
97                                 <legend>Choose a pet:</legend>
98                                         <input type="radio" name="radio-choice-1" id="radio-choice-1" value="choice-1" checked="checked" data-role="none" />
99                                         <label for="radio-choice-1">Cat</label>
100
101                                         <input type="radio" name="radio-choice-1" id="radio-choice-2" value="choice-2" data-role="none" />
102                                         <label for="radio-choice-2">Dog</label>
103
104                                         <input type="radio" name="radio-choice-1" id="radio-choice-3" value="choice-3" data-role="none" />
105                                         <label for="radio-choice-3">Hamster</label>
106
107                                         <input type="radio" name="radio-choice-1" id="radio-choice-4" value="choice-4" data-role="none" />
108                                         <label for="radio-choice-4">Lizard</label>
109                             </fieldset>
110                         </div>
111
112                         <div data-role="fieldcontain">
113                             <fieldset data-role="controlgroup" data-type="horizontal">
114                                 <legend>Layout view:</legend>
115                                         <input type="radio" name="radio-choice-b" id="radio-choice-c" value="on" checked="checked" data-role="none" />
116                                         <label for="radio-choice-c">List</label>
117                                         <input type="radio" name="radio-choice-b" id="radio-choice-d" value="off" data-role="none" />
118                                         <label for="radio-choice-d">Grid</label>
119                                         <input type="radio" name="radio-choice-b" id="radio-choice-e" value="other" data-role="none" />
120                                         <label for="radio-choice-e">Gallery</label>
121                             </fieldset>
122                         </div>
123
124                         <div data-role="fieldcontain">
125                                 <label for="select-choice-1" class="select">Choose shipping method:</label>
126                                 <select name="select-choice-1" id="select-choice-1" data-role="none">
127                                         <option value="standard">Standard: 7 day</option>
128                                         <option value="rush">Rush: 3 days</option>
129                                         <option value="express">Express: next day</option>
130                                         <option value="overnight">Overnight</option>
131                                 </select>
132                         </div>
133
134                         <div data-role="fieldcontain">
135                                 <label for="select-choice-3" class="select">Your state:</label>
136                                 <select name="select-choice-3" id="select-choice-3" data-role="none">
137                                         <option>Choose...</option>
138                                         <option value="AL">Alabama</option>
139                                         <option value="AK">Alaska</option>
140                                         <option value="AZ">Arizona</option>
141                                         <option value="AR">Arkansas</option>
142                                         <option value="CA">California</option>
143                                         <option value="CO">Colorado</option>
144                                         <option value="CT">Connecticut</option>
145                                         <option value="DE">Delaware</option>
146                                         <option value="FL">Florida</option>
147                                         <option value="GA">Georgia</option>
148                                         <option value="HI">Hawaii</option>
149                                         <option value="ID">Idaho</option>
150                                         <option value="IL">Illinois</option>
151                                         <option value="IN">Indiana</option>
152                                         <option value="IA">Iowa</option>
153                                         <option value="KS">Kansas</option>
154                                         <option value="KY">Kentucky</option>
155                                         <option value="LA">Louisiana</option>
156                                         <option value="ME">Maine</option>
157                                         <option value="MD">Maryland</option>
158                                         <option value="MA">Massachusetts</option>
159                                         <option value="MI">Michigan</option>
160                                         <option value="MN">Minnesota</option>
161                                         <option value="MS">Mississippi</option>
162                                         <option value="MO">Missouri</option>
163                                         <option value="MT">Montana</option>
164                                         <option value="NE">Nebraska</option>
165                                         <option value="NV">Nevada</option>
166                                         <option value="NH">New Hampshire</option>
167                                         <option value="NJ">New Jersey</option>
168                                         <option value="NM">New Mexico</option>
169                                         <option value="NY">New York</option>
170                                         <option value="NC">North Carolina</option>
171                                         <option value="ND">North Dakota</option>
172                                         <option value="OH">Ohio</option>
173                                         <option value="OK">Oklahoma</option>
174                                         <option value="OR">Oregon</option>
175                                         <option value="PA">Pennsylvania</option>
176                                         <option value="RI">Rhode Island</option>
177                                         <option value="SC">South Carolina</option>
178                                         <option value="SD">South Dakota</option>
179                                         <option value="TN">Tennessee</option>
180                                         <option value="TX">Texas</option>
181                                         <option value="UT">Utah</option>
182                                         <option value="VT">Vermont</option>
183                                         <option value="VA">Virginia</option>
184                                         <option value="WA">Washington</option>
185                                         <option value="WV">West Virginia</option>
186                                         <option value="WI">Wisconsin</option>
187                                         <option value="WY">Wyoming</option>
188                                 </select>
189                         </div>
190
191                                 
192
193
194                         <p><strong>Button</strong> based button:</p>
195                         <button data-role="none">Button element</button>
196
197                         <p><strong>Input type="button"</strong> based button:</p>
198                         <input type="button" value="Input type=button" data-role="none" />
199
200                         <p><strong>Input type="submit"</strong> based button:</p>
201                         <input type="submit" value="Input type=submit" data-role="none" />
202
203                         <p><strong>Input type="reset"</strong> based button:</p>
204                         <input type="reset" value="Input type=reset" data-role="none" />
205
206                         <p><strong>Input type="image"</strong> based button:</p>
207                         <input type="image" src="../_assets/images/jquery-logo.png" style="width:120px; padding:5px; background:#fff; border:1px solid #999;" value="Input type=image" data-role="none" />
208
209         </form>
210
211         </div><!--/content-primary -->          
212         
213         <div class="content-secondary">
214                 
215                 <div data-role="collapsible" data-collapsed="true" data-theme="b" data-content-theme="d">
216                         
217                                 <h3>More in this section</h3>
218                                 
219                                 <ul data-role="listview" data-theme="c" data-dividertheme="d">
220                                 
221                                         <li data-role="list-divider">Form elements</li>
222                                         <li><a href="docs-forms.html">Form basics</a></li>
223                                         <li><a href="forms-all.html">Form element gallery</a></li>
224                                         <li><a href="forms-all-mini.html">Mini form element gallery</a></li>
225                                         <li><a href="textinputs/">Text inputs</a></li>
226                                         <li><a href="search/">Search inputs</a></li>
227                                         <li><a href="slider/">Slider</a></li>
228                                         <li><a href="switch/">Flip toggle switch</a></li>
229                                         <li><a href="radiobuttons/">Radio buttons</a></li>
230                                         <li><a href="checkboxes/">Checkboxes</a></li>
231                                         <li><a href="selects/">Select menus</a></li>
232                                         <li><a href="forms-themes.html">Theming forms</a></li>
233                                         <li data-theme="a"><a href="forms-all-native.html">Native form elements</a></li>
234                                         <li><a href="forms-sample.html">Submitting forms</a></li>
235                                         
236         
237                                 </ul>
238                 </div>
239         </div>          
240
241 </div><!-- /content -->
242
243 <div data-role="footer" class="footer-docs" data-theme="c">
244                 <p class="jqm-version"></p>
245                 <p>&copy; 2012 jQuery Foundation and other contributors</p>
246 </div>
247         
248 </div><!-- /page -->
249
250 </body>
251 </html>
252