2016-03-07 19:52:19 -05:00
|
|
|
<%# frozen_string_literal: true %>
|
2009-11-07 19:13:16 -05:00
|
|
|
<h1>Form</h1>
|
|
|
|
|
|
|
|
<form action="/form" method="post">
|
2010-01-11 08:45:36 -05:00
|
|
|
|
2010-02-03 08:42:28 -05:00
|
|
|
<p>
|
|
|
|
<label for="form_title">Title</label>
|
|
|
|
<select name="form[title]" id="form_title">
|
|
|
|
<option>Mrs</option>
|
|
|
|
<option>Mr</option>
|
|
|
|
<option>Miss</option>
|
2013-03-15 15:10:15 -04:00
|
|
|
<option disabled="disabled">Other</option>
|
2010-02-03 08:42:28 -05:00
|
|
|
</select>
|
2013-01-29 04:35:23 -05:00
|
|
|
</p>
|
|
|
|
|
|
|
|
<p>
|
|
|
|
<label for="customer_name">Customer Name
|
|
|
|
<input type="text" name="form[customer_name]" value="Blah" id="customer_name" disabled="disabled"/>
|
|
|
|
</label>
|
2010-02-03 08:42:28 -05:00
|
|
|
</p>
|
|
|
|
|
2013-01-29 04:35:23 -05:00
|
|
|
<p>
|
|
|
|
<label for="customer_email">Customer Email
|
|
|
|
<input type="text" name="form[customer_email]" value="ben@ben.com" id="customer_email"/>
|
|
|
|
</label>
|
|
|
|
</p>
|
2010-07-01 22:45:02 -04:00
|
|
|
|
|
|
|
<p>
|
|
|
|
<label for="form_other_title">Other title</label>
|
|
|
|
<select name="form[other_title]" id="form_other_title">
|
|
|
|
<option>Mrs</option>
|
|
|
|
<option>Mr</option>
|
|
|
|
<option>Miss</option>
|
|
|
|
</select>
|
|
|
|
</p>
|
|
|
|
|
2009-11-07 19:13:16 -05:00
|
|
|
<p>
|
2009-12-09 15:53:12 -05:00
|
|
|
<label for="form_first_name">
|
|
|
|
First Name
|
2016-04-26 11:51:22 -04:00
|
|
|
<input type="text" name="form[first_name]" value="John" id="form_first_name" placeholder="FirstName"/>
|
2009-12-09 15:53:12 -05:00
|
|
|
</label>
|
2009-11-07 19:13:16 -05:00
|
|
|
</p>
|
|
|
|
|
|
|
|
<p>
|
2009-11-09 17:38:19 -05:00
|
|
|
<label for="form_last_name">Last Name</label>
|
|
|
|
<input type="text" name="form[last_name]" value="Smith" id="form_last_name"/>
|
2009-11-07 19:13:16 -05:00
|
|
|
</p>
|
2012-01-31 10:20:35 -05:00
|
|
|
|
2010-01-12 17:07:13 -05:00
|
|
|
<p>
|
|
|
|
<label for="form_name_explanation">Explanation of Name</label>
|
|
|
|
<textarea name="form[name_explanation]" id="form_name_explanation"></textarea>
|
|
|
|
</p>
|
2009-11-07 19:13:16 -05:00
|
|
|
|
2009-12-04 06:01:50 -05:00
|
|
|
<p>
|
|
|
|
<label for="form_name">Name</label>
|
|
|
|
<input type="text" name="form[name]" value="John Smith" id="form_name"/>
|
|
|
|
</p>
|
2010-03-12 14:11:21 -05:00
|
|
|
|
|
|
|
<p>
|
|
|
|
<label for="form_schmooo">Schmooo</label>
|
|
|
|
<input type="schmooo" name="form[schmooo]" value="This is Schmooo!" id="form_schmooo"/>
|
|
|
|
</p>
|
2012-01-31 10:20:35 -05:00
|
|
|
|
2009-12-15 17:31:57 -05:00
|
|
|
<p>
|
|
|
|
<label>Street<br/>
|
2011-07-08 06:48:25 -04:00
|
|
|
<input type="text" maxlength="" name="form[street]" value="Sesame street 66"/>
|
2009-12-15 17:31:57 -05:00
|
|
|
</label>
|
|
|
|
</p>
|
2009-12-04 06:01:50 -05:00
|
|
|
|
2009-12-04 07:35:17 -05:00
|
|
|
<p>
|
|
|
|
<label for="form_phone">Phone</label>
|
2010-05-20 07:43:16 -04:00
|
|
|
<input name="form[phone]" value="+1 555 7021" id="form_phone"/>
|
2009-12-04 07:35:17 -05:00
|
|
|
</p>
|
|
|
|
|
2009-11-10 17:08:26 -05:00
|
|
|
<p>
|
|
|
|
<label for="form_password">Password</label>
|
|
|
|
<input type="password" name="form[password]" value="seeekrit" id="form_password"/>
|
|
|
|
</p>
|
2009-12-04 10:19:00 -05:00
|
|
|
|
|
|
|
<p>
|
|
|
|
<label for="form_terms_of_use">Terms of Use</label>
|
|
|
|
<input type="hidden" name="form[terms_of_use]" value="0" id="form_terms_of_use_default">
|
|
|
|
<input type="checkbox" name="form[terms_of_use]" value="1" id="form_terms_of_use">
|
|
|
|
</p>
|
|
|
|
|
2009-11-12 11:07:43 -05:00
|
|
|
<p>
|
|
|
|
<label for="form_image">Image</label>
|
|
|
|
<input type="file" name="form[image]" id="form_image"/>
|
|
|
|
</p>
|
2012-01-31 10:20:35 -05:00
|
|
|
|
2009-11-11 15:41:20 -05:00
|
|
|
<p>
|
|
|
|
<input type="hidden" name="form[token]" value="12345" id="form_token"/>
|
|
|
|
</p>
|
2009-11-10 17:08:26 -05:00
|
|
|
|
2009-11-09 17:10:15 -05:00
|
|
|
<p>
|
|
|
|
<label for="form_locale">Locale</label>
|
|
|
|
<select name="form[locale]" id="form_locale">
|
|
|
|
<option value="sv">Swedish</option>
|
|
|
|
<option selected="selected" value="en">English</option>
|
|
|
|
<option value="fi">Finish</option>
|
|
|
|
<option value="no">Norwegian</option>
|
2010-04-26 11:23:34 -04:00
|
|
|
<option value="jo">John's made-up language</option>
|
2010-05-31 23:16:58 -04:00
|
|
|
<option value="jbo"> Lojban </option>
|
2009-11-09 17:10:15 -05:00
|
|
|
</select>
|
|
|
|
</p>
|
|
|
|
|
|
|
|
<p>
|
|
|
|
<label for="form_region">Region</label>
|
|
|
|
<select name="form[region]" id="form_region">
|
|
|
|
<option>Sweden</option>
|
|
|
|
<option selected="selected">Norway</option>
|
|
|
|
<option>Finland</option>
|
|
|
|
</select>
|
|
|
|
</p>
|
|
|
|
|
|
|
|
<p>
|
|
|
|
<label for="form_city">City</label>
|
|
|
|
<select name="form[city]" id="form_city">
|
|
|
|
<option>London</option>
|
|
|
|
<option>Stockholm</option>
|
|
|
|
<option>Paris</option>
|
|
|
|
</select>
|
|
|
|
</p>
|
|
|
|
|
2011-02-20 14:23:11 -05:00
|
|
|
<p>
|
|
|
|
<label for="form_zipcode">Zipcode</label>
|
|
|
|
<input type="text" maxlength="5" name="form[zipcode]" id="form_zipcode" />
|
|
|
|
</p>
|
|
|
|
|
2009-11-09 17:10:15 -05:00
|
|
|
<p>
|
|
|
|
<label for="form_tendency">Tendency</label>
|
|
|
|
<select name="form[tendency]" id="form_tendency"></select>
|
|
|
|
</p>
|
|
|
|
|
|
|
|
<p>
|
|
|
|
<label for="form_description">Description</label></br>
|
|
|
|
<textarea name="form[description]" id="form_description">Descriptive text goes here</textarea>
|
|
|
|
<p>
|
2013-08-08 21:36:33 -04:00
|
|
|
|
2013-04-25 21:09:34 -04:00
|
|
|
<p>
|
|
|
|
<label for="form_newline">NewLine</label></br>
|
|
|
|
<textarea name="form[newline]" id="form_newline">
|
|
|
|
|
|
|
|
New line after and before textarea tag
|
|
|
|
</textarea>
|
|
|
|
</p>
|
2009-11-09 17:10:15 -05:00
|
|
|
|
|
|
|
<p>
|
2009-11-11 15:37:48 -05:00
|
|
|
<input type="radio" name="form[gender]" value="male" id="gender_male"/>
|
2009-11-09 17:10:15 -05:00
|
|
|
<label for="gender_male">Male</label>
|
2009-11-11 15:37:48 -05:00
|
|
|
<input type="radio" name="form[gender]" value="female" id="gender_female" checked="checked"/>
|
2009-11-09 17:10:15 -05:00
|
|
|
<label for="gender_female">Female</label>
|
2009-11-11 15:37:48 -05:00
|
|
|
<input type="radio" name="form[gender]" value="both" id="gender_both"/>
|
2009-11-09 17:10:15 -05:00
|
|
|
<label for="gender_both">Both</label>
|
|
|
|
</p>
|
|
|
|
|
2016-04-21 19:30:44 -04:00
|
|
|
<p>
|
|
|
|
<input type="radio" name="form[party]" value="democrat" id="party_democrat" style="display:none"/>
|
|
|
|
<label for="party_democrat">Democrat</label>
|
|
|
|
<input type="radio" name="form[party]" value="republican" id="party_republican" style="display:none"/>
|
|
|
|
<label for="party_republican">Republican</label>
|
|
|
|
<input type="radio" name="form[party]" value="independent" id="party_independent" checked="checked" style="display:none"/>
|
|
|
|
<label for="party_independent">Independent</label>
|
|
|
|
</p>
|
|
|
|
|
2016-02-01 13:54:51 -05:00
|
|
|
<p>
|
|
|
|
<input type="checkbox" id="no_attr_value_checked" value="1" checked/>
|
|
|
|
</p>
|
|
|
|
|
2009-11-09 17:10:15 -05:00
|
|
|
<p>
|
2009-11-11 15:55:20 -05:00
|
|
|
<input type="checkbox" value="dog" name="form[pets][]" id="form_pets_dog" checked="checked"/>
|
|
|
|
<label for="form_pets_dog">Dog</label>
|
|
|
|
<input type="checkbox" value="cat" name="form[pets][]" id="form_pets_cat"/>
|
|
|
|
<label for="form_pets_cat">Cat</label>
|
|
|
|
<input type="checkbox" value="hamster" name="form[pets][]" id="form_pets_hamster" checked="checked"/>
|
|
|
|
<label for="form_pets_hamster">Hamster</label>
|
2009-11-09 17:10:15 -05:00
|
|
|
</p>
|
2015-08-25 17:25:42 -04:00
|
|
|
|
2016-04-21 17:25:14 -04:00
|
|
|
<p>
|
|
|
|
<input type="checkbox" value="jaguar" name="form[cars][]" id="form_cars_jaguar" checked="checked" style="display: none"/>
|
|
|
|
<label for="form_cars_jaguar">Jaguar</label>
|
|
|
|
<input type="checkbox" value="tesla" name="form[cars][]" id="form_cars_tesla" style="display: none"/>
|
|
|
|
<label for="form_cars_tesla">Tesla</label>
|
|
|
|
<input type="checkbox" value="ferrari" name="form[cars][]" id="form_cars_ferrari" checked="checked" style="display: none"/>
|
|
|
|
<label for="form_cars_ferrari">Ferrari</label>
|
|
|
|
<input type="checkbox" value="ariel" name="form[cars][]" id="form_cars_ariel" style="display: none"/>
|
|
|
|
<label>
|
|
|
|
McLaren
|
|
|
|
<input type="checkbox" value="mclaren" name="form[cars][]" id="form_cars_mclaren" style="display: none"/>
|
|
|
|
</label>
|
|
|
|
<label>
|
|
|
|
Koenigsegg
|
|
|
|
<input type="checkbox" value="koenigsegg" name="form[cars][]" id="form_cars_koenigsegg" checked="checked" style="display: none"/>
|
|
|
|
</label>
|
|
|
|
</p>
|
|
|
|
|
2013-10-26 18:12:43 -04:00
|
|
|
<p>
|
|
|
|
<input type="checkbox" name="form[valueless_checkbox]" id="valueless_checkbox" checked="checked"/>
|
|
|
|
<label for="valueless_checkbox">Valueless Checkbox</label>
|
|
|
|
<input type="radio" name="form[valueless_radio]" id="valueless_radio" checked="checked"/>
|
|
|
|
<label for="valueless_radio">Valueless Radio</label>
|
|
|
|
</p>
|
2009-11-09 17:10:15 -05:00
|
|
|
|
2010-02-17 18:55:11 -05:00
|
|
|
<p>
|
|
|
|
<label for="form_languages">Languages</label>
|
|
|
|
<select name="form[languages][]" id="form_languages" multiple="multiple">
|
|
|
|
<option>Ruby</option>
|
|
|
|
<option>SQL</option>
|
|
|
|
<option>HTML</option>
|
|
|
|
<option>Javascript</option>
|
|
|
|
</select>
|
|
|
|
</p>
|
|
|
|
|
2010-02-19 15:37:46 -05:00
|
|
|
<p>
|
|
|
|
<label for="form_underwear">Underwear</label>
|
|
|
|
<select name="form[underwear][]" id="form_underwear" multiple="multiple">
|
2012-01-31 10:20:35 -05:00
|
|
|
<option selected="selected">Boxerbriefs</option>
|
2010-02-19 15:37:46 -05:00
|
|
|
<option>Boxers</option>
|
|
|
|
<option selected="selected">Briefs</option>
|
|
|
|
<option selected="selected">Commando</option>
|
2010-04-26 11:23:34 -04:00
|
|
|
<option selected="selected">Frenchman's Pantalons</option>
|
2010-10-04 16:17:07 -04:00
|
|
|
<option selected="selected" value="thermal">Long Johns</option>
|
2010-02-19 15:37:46 -05:00
|
|
|
</select>
|
|
|
|
</p>
|
2012-01-31 10:20:35 -05:00
|
|
|
|
2015-10-06 16:42:45 -04:00
|
|
|
<!-- invisible select and options -->
|
|
|
|
<p style="display: none">
|
|
|
|
<label for="form_icecream">Icecream</label>
|
|
|
|
<select name="form[icecream]" id="form_icecream">
|
|
|
|
<option selected="selected">Chocolate</option>
|
|
|
|
<option>Vanilla</option>
|
|
|
|
<option>Strawberry</option>
|
|
|
|
</select>
|
|
|
|
</p>
|
|
|
|
|
|
|
|
<!-- visible select with invisible selected option (which some browsers may treat as visible) -->
|
|
|
|
<p>
|
|
|
|
<label for="form_sorbet">Sorbet</label>
|
|
|
|
<select name="form[sorbet]" id="form_sorbet">
|
|
|
|
<option>Chocolate</option>
|
|
|
|
<option selected="selected" style="display: none">Vanilla</option>
|
|
|
|
<option>Strawberry</option>
|
|
|
|
</select>
|
|
|
|
</p>
|
|
|
|
|
2010-10-10 04:18:21 -04:00
|
|
|
<p>
|
|
|
|
<span>First address<span>
|
|
|
|
<label for='address1_street'>Street</label>
|
|
|
|
<input type="text" name="form[addresses][][street]" value="" id="address1_street">
|
2011-01-20 06:36:38 -05:00
|
|
|
|
2010-10-10 04:18:21 -04:00
|
|
|
<label for='address1_city'>City</label>
|
2011-01-20 06:36:38 -05:00
|
|
|
<input type="text" name="form[addresses][][city]" value="" id="address1_city">
|
|
|
|
|
|
|
|
<label for='address1_country'>Country</label>
|
|
|
|
<select name="form[addresses][][country]" id="address1_country">
|
|
|
|
<option>France</option>
|
|
|
|
<option>Ukraine</option>
|
|
|
|
</select>
|
|
|
|
</p>
|
2010-10-10 04:18:21 -04:00
|
|
|
|
2011-01-20 06:36:38 -05:00
|
|
|
<p>
|
2010-10-10 04:18:21 -04:00
|
|
|
<span>Second address<span>
|
|
|
|
<label for='address2_street'>Street</label>
|
|
|
|
<input type="text" name="form[addresses][][street]" value="" id="address2_street">
|
2011-01-20 06:36:38 -05:00
|
|
|
|
2010-10-10 04:18:21 -04:00
|
|
|
<label for='address2_city'>City</label>
|
2012-01-31 10:20:35 -05:00
|
|
|
<input type="text" name="form[addresses][][city]" value="" id="address2_city">
|
2011-01-20 06:36:38 -05:00
|
|
|
|
|
|
|
<label for='address2_country'>Country</label>
|
|
|
|
<select name="form[addresses][][country]" id="address2_country">
|
|
|
|
<option>France</option>
|
|
|
|
<option>Ukraine</option>
|
|
|
|
</select>
|
2010-10-10 04:18:21 -04:00
|
|
|
</p>
|
2010-02-19 15:37:46 -05:00
|
|
|
|
2010-01-30 13:48:25 -05:00
|
|
|
<div style="display:none;">
|
|
|
|
<label for="form_first_name_hidden">
|
|
|
|
Super Secret
|
|
|
|
<input type="text" name="form[super_secret]" value="test123" id="form_super_secret"/>
|
|
|
|
</label>
|
|
|
|
</div>
|
|
|
|
|
2010-06-03 16:15:09 -04:00
|
|
|
<p>
|
|
|
|
<label for="form_disabled_text_field">
|
|
|
|
Disabled Text Field
|
|
|
|
<input type="text" name="form[disabled_text_field]" value="Should not see me" id="form_disabled_text_field" disabled="disabled" />
|
|
|
|
</label>
|
|
|
|
</p>
|
|
|
|
|
|
|
|
<p>
|
|
|
|
<label for="form_disabled_textarea">
|
|
|
|
Disabled Textarea
|
2010-08-21 11:09:10 -04:00
|
|
|
<textarea name="form[disabled_textarea]" value="Should not see me" id="form_disabled_textarea" disabled="disabled"></textarea>
|
2010-06-03 16:15:09 -04:00
|
|
|
</label>
|
|
|
|
</p>
|
|
|
|
|
|
|
|
<p>
|
|
|
|
<label for="form_disabled_checkbox">
|
|
|
|
Disabled Checkbox
|
|
|
|
<input type="checkbox" name="form[disabled_checkbox]" value="Should not see me" id="form_disabled_checkbox" checked="checked" disabled="disabled" />
|
|
|
|
</label>
|
|
|
|
</p>
|
|
|
|
|
2013-08-08 21:36:33 -04:00
|
|
|
<p>
|
|
|
|
<label for="form_disabled_unchecked_checkbox">
|
|
|
|
Disabled Unchecked Checkbox
|
|
|
|
<input type="checkbox" name="form[disabled_unchecked_checkbox]" value="Should not see me" id="form_disabled_unchecked_checkbox" disabled="disabled" />
|
|
|
|
</label>
|
|
|
|
</p>
|
|
|
|
|
2010-06-03 16:15:09 -04:00
|
|
|
<p>
|
|
|
|
<label for="form_disabled_radio">
|
2011-01-19 09:19:04 -05:00
|
|
|
Disabled Radio
|
2010-06-03 16:15:09 -04:00
|
|
|
<input type="radio" name="form[disabled_radio]" value="Should not see me" id="form_disabled_radio" checked="checked" disabled="disabled" />
|
|
|
|
</label>
|
|
|
|
</p>
|
|
|
|
|
|
|
|
<p>
|
|
|
|
<label for="form_disabled_select">
|
|
|
|
Disabled Select
|
|
|
|
<select name="form[disabled_select]" id="form_disabled_select" disabled="disabled">
|
|
|
|
<option value="Should not see me" selected="selected">Should not see me</option>
|
|
|
|
</select>
|
|
|
|
</label>
|
|
|
|
</p>
|
|
|
|
|
2016-02-01 13:54:51 -05:00
|
|
|
<p>
|
|
|
|
<label for="form_disabled_select2">
|
|
|
|
Disabled Select 2
|
|
|
|
<select name="form[disabled_select2]" id="form_disabled_select2" disabled>
|
|
|
|
<option value="Should not see me" selected="selected">Should not see me</option>
|
|
|
|
</select>
|
|
|
|
</label>
|
|
|
|
</p>
|
|
|
|
|
|
|
|
|
2010-06-03 16:15:09 -04:00
|
|
|
<p>
|
|
|
|
<label for="form_disabled_file">
|
|
|
|
Disabled File
|
|
|
|
<input type="file" name="form[disabled_file]" value="/should/not/see/me" id="form_disabled_file" disabled="disabled" />
|
|
|
|
</label>
|
|
|
|
</p>
|
|
|
|
|
2009-11-07 19:13:16 -05:00
|
|
|
<p>
|
2010-02-18 19:29:53 -05:00
|
|
|
<input type="button" name="form[fresh]" id="fresh_btn" value="i am fresh"/>
|
2011-03-13 23:29:26 -04:00
|
|
|
<input type="submit" name="form[awesome]" id="awe123" title="What an Awesome Button" value="awesome"/>
|
2009-11-07 19:29:03 -05:00
|
|
|
<input type="submit" name="form[crappy]" id="crap321" value="crappy"/>
|
2011-03-13 23:29:26 -04:00
|
|
|
<input type="image" name="form[okay]" id="okay556" title="Okay 556 Image" value="okay" alt="oh hai thar"/>
|
|
|
|
<button type="submit" id="click_me_123" title="Click Title button" value="click_me">Click me!</button>
|
2010-02-24 13:37:31 -05:00
|
|
|
<button type="submit" name="form[no_value]">No Value!</button>
|
2010-10-05 22:08:36 -04:00
|
|
|
<button id="no_type">No Type!</button>
|
2013-03-08 09:12:45 -05:00
|
|
|
<input type="button" disabled="disabled" value="Disabled button"/>
|
2009-11-07 19:13:16 -05:00
|
|
|
</p>
|
2015-08-25 17:25:42 -04:00
|
|
|
|
|
|
|
<p>
|
|
|
|
<input id="readonly" name="form[readonly_test]" readonly/>
|
|
|
|
<input id="not_readonly" name="form[readonly_test]" />
|
|
|
|
</p>
|
2009-11-07 19:13:16 -05:00
|
|
|
</form>
|
2009-11-09 17:38:19 -05:00
|
|
|
|
2013-02-11 19:36:54 -05:00
|
|
|
<input type="text" name="form[outside_input]" value="outside_input" form="form1"/>
|
|
|
|
|
2016-04-06 13:59:11 -04:00
|
|
|
<label>
|
|
|
|
Nested Label
|
|
|
|
<input type="text" name="nested_label" id="nested_label"/>
|
|
|
|
</label>
|
|
|
|
|
2013-02-11 12:47:40 -05:00
|
|
|
<form id="form1" action="/form" method="post">
|
|
|
|
<input type="text" name="form[which_form]" value="form1" id="form_which_form"/>
|
2013-02-11 19:36:54 -05:00
|
|
|
<input type="text" name="form[for_form2]" value="for_form2" form="form2"/>
|
|
|
|
<input type="submit" name="form[submit_form1]" value="submit_form1" id="submit_form1"/>
|
2013-02-11 12:47:40 -05:00
|
|
|
</form>
|
|
|
|
|
|
|
|
<form id="form2" action="/form" method="post">
|
|
|
|
<input type="text" name="form[which_form]" value="form2" id="form_which_form"/>
|
|
|
|
<input type="submit" name="form[unused]" value="unused"/>
|
|
|
|
<button type="submit" name="form[other_form_button]" value="other_form_button" form="form1">Form1</button>
|
|
|
|
</form>
|
|
|
|
|
2013-04-22 12:12:35 -04:00
|
|
|
<button type="submit" name="form[no_form_button]" value="no_form_button">No Form</button>
|
|
|
|
|
2013-02-11 19:36:54 -05:00
|
|
|
<textarea name="form[outside_textarea]" form="form1">Some text here</textarea>
|
|
|
|
<select name="form[outside_select]" form="form1">
|
|
|
|
<option>Lisp</option>
|
|
|
|
<option selected="selected">Ruby</option>
|
|
|
|
<option>Php</option>
|
|
|
|
</select>
|
|
|
|
|
2013-02-11 12:47:40 -05:00
|
|
|
<input type="submit" name="form[outside_submit]" value="outside_submit" form="form1"/>
|
|
|
|
<button type="submit" name="form[outside_button]" value="outside_button" form="form2">Outside!</button>
|
|
|
|
|
2009-11-09 17:38:19 -05:00
|
|
|
|
2010-07-09 19:19:09 -04:00
|
|
|
<form id="get-form" action="/form/get?foo=bar" method="get">
|
2009-11-09 17:38:19 -05:00
|
|
|
<p>
|
2009-11-17 17:36:27 -05:00
|
|
|
<label for="form_middle_name">Middle Name</label>
|
2009-11-09 17:38:19 -05:00
|
|
|
<input type="text" name="form[middle_name]" value="Darren" id="form_middle_name"/>
|
|
|
|
</p>
|
|
|
|
|
|
|
|
<p>
|
|
|
|
<input type="submit" name="form[mediocre]" id="mediocre" value="med"/>
|
|
|
|
<p>
|
|
|
|
</form>
|
2009-11-12 11:07:43 -05:00
|
|
|
|
2010-12-06 02:22:59 -05:00
|
|
|
<form action="/upload_empty" method="post" enctype="multipart/form-data">
|
|
|
|
<p>
|
|
|
|
<label for="form_file_name">File Name</label>
|
|
|
|
<input type="file" name="form[file]" id="form_file"/>
|
|
|
|
</p>
|
|
|
|
|
|
|
|
<p>
|
2012-01-03 12:08:55 -05:00
|
|
|
<input type="hidden" name="form[dummy]" value="ensure params[:form] exists"/>
|
2010-12-06 02:22:59 -05:00
|
|
|
<input type="submit" value="Upload Empty"/>
|
|
|
|
<p>
|
|
|
|
</form>
|
|
|
|
|
2013-07-02 11:18:15 -04:00
|
|
|
<form action="/upload_empty" method="post" enctype="multipart/form-data">
|
|
|
|
<p>
|
|
|
|
<label>
|
|
|
|
<input type="file" name="form[file]" multiple="multiple"/>
|
|
|
|
Multiple empty files
|
|
|
|
</label>
|
|
|
|
</p>
|
|
|
|
|
|
|
|
<p>
|
|
|
|
<input type="hidden" name="form[dummy]" value="ensure params[:form] exists"/>
|
|
|
|
<input type="submit" value="Upload Empty Multiple"/>
|
|
|
|
<p>
|
|
|
|
</form>
|
|
|
|
|
2009-11-12 11:07:43 -05:00
|
|
|
<form action="/upload" method="post" enctype="multipart/form-data">
|
2009-12-03 06:56:39 -05:00
|
|
|
<p>
|
2009-12-04 06:01:50 -05:00
|
|
|
<label for="form_file_name">File Name</label>
|
|
|
|
<input type="file" name="form[file_name]" id="form_file_name"/>
|
2009-12-03 06:56:39 -05:00
|
|
|
</p>
|
|
|
|
|
2009-11-12 11:07:43 -05:00
|
|
|
<p>
|
2012-01-31 10:20:35 -05:00
|
|
|
<label for="form_document">Single Document</label>
|
2009-11-12 11:07:43 -05:00
|
|
|
<input type="file" name="form[document]" id="form_document"/>
|
|
|
|
</p>
|
2012-01-31 10:20:35 -05:00
|
|
|
|
2009-11-12 11:07:43 -05:00
|
|
|
<p>
|
2012-01-31 10:20:35 -05:00
|
|
|
<input type="submit" value="Upload Single"/>
|
2009-11-12 11:07:43 -05:00
|
|
|
<p>
|
|
|
|
</form>
|
2009-11-12 13:02:00 -05:00
|
|
|
|
2010-11-10 17:43:58 -05:00
|
|
|
<form action="/upload_multiple" method="post" enctype="multipart/form-data">
|
|
|
|
<p>
|
|
|
|
<label for="form_multiple_file_name">File Name</label>
|
|
|
|
<input type="file" name="form[multiple_file_name]" id="form_multiple_file_name"/>
|
|
|
|
</p>
|
|
|
|
|
|
|
|
<p>
|
|
|
|
<label for="form_multiple_documents">Multiple Documents</label>
|
2013-02-27 08:34:12 -05:00
|
|
|
<input type="file" name="form[multiple_documents][]" id="form_multiple_documents" multiple="multiple" />
|
2010-11-10 17:43:58 -05:00
|
|
|
</p>
|
|
|
|
|
|
|
|
<p>
|
|
|
|
<input type="submit" value="Upload Multiple"/>
|
|
|
|
<p>
|
|
|
|
</form>
|
|
|
|
|
2009-11-12 13:02:00 -05:00
|
|
|
<form action="/redirect" method="post">
|
|
|
|
<p>
|
|
|
|
<input type="submit" value="Go FAR"/>
|
|
|
|
</p>
|
|
|
|
</form>
|
2010-01-08 00:08:55 -05:00
|
|
|
|
|
|
|
<form action="/form" method="post">
|
|
|
|
<p>
|
|
|
|
<label for="html5_email">Html5 Email</label>
|
|
|
|
<input type="email" name="form[html5_email]" value="person@email.com" id="html5_email"/>
|
|
|
|
</p>
|
2016-02-03 14:02:19 -05:00
|
|
|
<p>
|
|
|
|
<label for="html5_multiple_email">Html5 Multiple Email</label>
|
|
|
|
<input type="email" multiple name="form[html5_multiple_email]" value="person@email.com" id="html5_multiple_email"/>
|
|
|
|
</p>
|
2010-01-08 00:08:55 -05:00
|
|
|
<p>
|
|
|
|
<label for="html5_url">Html5 Url</label>
|
|
|
|
<input type="url" name="form[html5_url]" value="http://www.example.com" id="html5_url"/>
|
|
|
|
</p>
|
|
|
|
<p>
|
|
|
|
<label for="html5_search">Html5 Search</label>
|
|
|
|
<input type="search" name="form[html5_search]" value="what are you looking for" id="html5_search"/>
|
|
|
|
</p>
|
|
|
|
<p>
|
|
|
|
<label for="html5_tel">Html5 Tel</label>
|
|
|
|
<input type="tel" name="form[html5_tel]" value="911" id="html5_tel"/>
|
|
|
|
</p>
|
|
|
|
<p>
|
|
|
|
<label for="html5_color">Html5 Color</label>
|
2011-06-28 04:13:05 -04:00
|
|
|
<input type="color" name="form[html5_color]" value="#FFFFFF" id="html5_color"/>
|
2010-01-08 00:08:55 -05:00
|
|
|
</p>
|
2012-01-31 10:20:35 -05:00
|
|
|
|
2010-02-19 01:16:28 -05:00
|
|
|
<p>
|
|
|
|
<input type="submit" name="form[html5_submit]" value="html5_submit"/>
|
|
|
|
</p>
|
2010-01-08 00:08:55 -05:00
|
|
|
</form>
|
2010-01-11 15:18:32 -05:00
|
|
|
|
|
|
|
<form action="/form" method="post">
|
|
|
|
<p>
|
|
|
|
<button type="submit" name="form[button]" value="button_first">Just an input that came first</button>
|
|
|
|
<button type="submit" name="form[button]" value="button_second">Just an input</button>
|
|
|
|
<input type="submit" name="form[button]" value="Just a button that came first"/>
|
|
|
|
<input type="submit" name="form[button]" value="Just a button"/>
|
|
|
|
</p>
|
2010-01-30 13:48:25 -05:00
|
|
|
</form>
|
2011-05-22 03:34:46 -04:00
|
|
|
|
2013-12-12 14:47:45 -05:00
|
|
|
<form action="/other_form" method="post">
|
|
|
|
<p>
|
|
|
|
<input type="text" name="form[which_form]" value="formaction form"/>
|
|
|
|
</p>
|
|
|
|
<input type="submit" name="form[button]" formaction="/form" value="Formaction button"/>
|
2014-08-12 03:45:11 -04:00
|
|
|
<input type="submit" name="form[button]" formaction="/form/get" formmethod="get" value="Formmethod button"/>
|
2013-12-12 14:47:45 -05:00
|
|
|
</form>
|
|
|
|
|
2011-05-22 03:34:46 -04:00
|
|
|
<form action="relative" method="post">
|
|
|
|
<p>
|
|
|
|
<input type="submit" name="form[relative]" value="Relative Action" />
|
|
|
|
</p>
|
|
|
|
</form>
|
2011-05-22 04:37:02 -04:00
|
|
|
|
|
|
|
<form method="post">
|
|
|
|
<p>
|
|
|
|
<input type="submit" name="form[no_action]" value="No Action" />
|
|
|
|
</p>
|
|
|
|
</form>
|
2013-04-22 12:12:35 -04:00
|
|
|
|
|
|
|
|