Is it possible to remove items from a form's Tab Order?
I have a few items that I do not want to tab into, including a few hyperlinks. The hyperlinks are on a separate page of the PDF from the editable fields, and I want the tab order to recycle to the start of the fields after the last one is exited. I do not want to switch to the page which includes the links if the user hits the tab key from the last field on the form; I would prefer to cycle back to the first field.
Thanks, I didn't think there was a way. Unfortunately, while probably the only option available, the 'setFocus' would cause problems if the user exits the field by clicking another field, so that's a no-go for me.
My client will just have to accept the file tabbing to the links and buttons. Thanks again.
Ah, that might work. There are 2 buttons and an invisible field on the entry page as well (which I also wanted to remove from the tab order); I'll see if adding the 'setFocus' to one of them might be more desirable.
I just tested this, and it looks like this might be the best solution. I was worried that clicking on the buttons might trigger the 'lostFocus', but that doesn't seem to be the case. I added the 'setFocus' to all of the buttons, and that looks like it might do what I want.
After thinking about it overnight, I decided that a better option would be to use the button's OnFocus instead of the LostFocus, and that does exactly what I am looking for - after tabbing from the last field, it automatically goes to the first field. Using the onBlur event, an extra tab is needed between the last field and the first field.
By using the buttons, instead of setting the onBlur from the last field, I don't have to worry about any problems that could occur if the field order changes.
Awesome, thanks again!
A little more testing, and I am finding that this isn't quite as perfect as I had originally assumed (I don't want to change the focus when the button is pressed). I need to experiment a little more, but I think that setting a flag when the button is pressed to suppress the setFocus action should make it work properly for me.