I have a registration form using the following code:
<form accept-charset="UTF-8" action="/sign-up" class="simple_form customer" id="customer_new" method="post" novalidate="novalidate"><div style="margin:0;padding:0;display:inline"><input name="utf8" type="hidden" value="✓" /><input name="authenticity_token" type="hidden" value="KmdKII+6lUG4m2VzCwvSdIURwWOmZmsAsCrPt9cExJA=" /></div>
<fieldset>
<div class="grouped">
<div class="input string required"><label class="string required" for="customer_fname"> First name</label><input class="string required half" id="customer_fname" name="customer[fname]" size="50" type="text" /></div>
<div class="input string required"><label class="string required" for="customer_lname"> Last name</label><input class="string required half" id="customer_lname" name="customer[lname]" size="50" type="text" /></div>
</div>
<div class="grouped">
<div class="input string email required"><label class="email required" for="customer_email"> Email</label><input class="string email required half" id="customer_email" name="customer[email]" size="50" type="text" /></div>
<div class="input string required"><label class="string required" for="customer_zip"> Zip code</label><input class="string required" id="customer_zip" maxlength="5" name="customer[zip]" size="5" type="text" /></div>
</div>
<div class="grouped">
<div class="input string password required"><label class="password required" for="customer_password"> Password</label><input class="string password required half" id="customer_password" name="customer[password]" size="50" type="password" /></div>
<div class="input string password optional"><label class="password optional" for="customer_password_confirmation"> Password confirmation</label><input class="string password optional half" id="customer_password_confirmation" name="customer[password_confirmation]" size="50" type="password" /></div>
</div>
</fieldset>
<input id="sign-me-up" name="commit" type="submit" value="Sign me up for doggyloot!" />
</form>
When I submit the form, Firefox asks me if I enter a zip code field. Right now, the zip code field is one right in front of the password field in the HTML source. If I switch it so that the email field is to the right of the password, it will ask me correctly if I want to remember the password for .Do you want to remember the password for "90210" on http://localhost:3000?90210example@example.com
But is there a way to tell Firefox (or any browser) which field is the username / email field, even if it doesn't come immediately before the password field?
Devin source
share