Log in

View Full Version : Tab key skipping a field in a contact form?



ModernRevolutions
02-01-2011, 09:58 PM
Simple thing here, if you got to my site here (http://www.modernrevolutions.net) and you click to leave a comment on any one of my blog posts, then you scroll down and go to my form to leave me a contact, if you use tab to go from Name, to Email and then press it again, it skips over Website, I want it so if you press tab it will go from Name, to Email, to Website and then to the comment field. Here is my comment form:


<p>
<label><?php _e('Name'); ?> <?php if ($req) _e('(required)'); ?></label>:<br />
<input type="text" class="input" name="author" id="author" value="<?php echo $comment_author; ?>" size="30" tabindex="1" />

</p>

<p>
<label><?php _e('E-mail'); ?> <?php if ($req) _e('(required)'); ?></label><br />
<input type="text" class="input" name="email" id="email" value="<?php echo $comment_author_email; ?>" size="30" tabindex="2" />
</p>

<p>
<label>Website</label><br />
<input type="text" class="input" name="url" id="url" value="<?php echo $comment_author_url; ?>" size="30" tabindex="3" />
</p>

timbim
02-07-2011, 09:42 PM
The textarea below it has tabindex 2, the website field has tabindex 3. You need to change the tabindex for the textarea to 4, and then it will work fine.

Tim