Tabbing in Fields

Issues related to forms.
Post Reply
User avatar
Starb7
 
 
Posts: 224
Joined: Tue Sep 05, 2006 12:35 pm
Location: Derbyshire

Tabbing in Fields

Post by Starb7 »

Hi

is there a way to keep the tabbing of fields within a Form, ie the Form retains the focus until a user clicks out of it? I ask because I use a form to send emails and when you tab out of the last input field, it jumps to the top of the page, ie the next tab-able field.

TIA
User avatar
Pablo
 
Posts: 17111
Joined: Tue Mar 28, 2006 12:00 pm
Location: Europe
Contact:

Re: Tabbing in Fields

Post by Pablo »

You can use the 'tab-index' to set the tab-order.
User avatar
Starb7
 
 
Posts: 224
Joined: Tue Sep 05, 2006 12:35 pm
Location: Derbyshire

Re: Tabbing in Fields

Post by Starb7 »

Hi

I have but it still jumps to the top of the page.

Please visit http://www.directgasltd.co.uk/ and scroll to the form at the bottom. Just tab out of the last field and for whetever reason, it jumps to a Link at the top, which oddly doesn't have a tab value anyhow.

What am I missing?

Thanks for you help as usual.

Cheers
WWBman
 
 
Posts: 805
Joined: Fri Jan 08, 2010 6:10 pm

Re: Tabbing in Fields

Post by WWBman »

You haven't set the Tab Index on the Send Form button.
User avatar
Starb7
 
 
Posts: 224
Joined: Tue Sep 05, 2006 12:35 pm
Location: Derbyshire

Re: Tabbing in Fields

Post by Starb7 »

Hi WWBman

Ah, I hadn't considered the buttons as tabbable but have now set these and, not surprisingly, it now jumps to the button :)

In my original query I also asked if it were possible to keeps the tabs within a form, ie it just cycles the form and the user must click out to go elsewhere. Again this is because although the buttons are now tabbed, tabbing from the 'Send Form' jumps back up to the top of the page :(

Cheers

Paul
WWBman
 
 
Posts: 805
Joined: Fri Jan 08, 2010 6:10 pm

Re: Tabbing in Fields

Post by WWBman »

Sorry, I don't know a way of doing your second point, maybe someone else does.
Are you sure you want it to do that?
I don't think forms usually do that, I could be wrong.
User avatar
BaconFries
 
 
Posts: 4390
Joined: Thu Aug 16, 2007 7:32 pm

Re: Tabbing in Fields

Post by BaconFries »

It may be possible using some javascript but you may not be interested in what I say. But as WWBman has said forms don't usually do this and onsubmit the form is submitted and directed away to another page such as the index page.
User avatar
Starb7
 
 
Posts: 224
Joined: Tue Sep 05, 2006 12:35 pm
Location: Derbyshire

Re: Tabbing in Fields - SOLVED

Post by Starb7 »

Hi WWBman and BaconFries

Thank you both for you input on this.

As you both say, I can't see an easy way and BaconFries, you are probably right in the JavaScript route and while I would be very interested in what you say, I'm not sure it's going to be worth the effort needed to achieve what looks to be a simple function/feature so will probably leave it.

Thanks again for you help.

Cheers

Paul
Post Reply