How can you set umbraco form fields html tab order?
Hi
I'm building a form that has two vertical columns of form fields. The client want's it so that when you hit the tab key to move to next field it moves to the next field to the right rather than the next field below. So tab order needs to be 1 field on left, then first field on right, second field on left, second on right etc ...
I would have thought this was a fairly common requirement but I can't find any way to (or mention of) setting custom tab orders on form fields. Anyone have any ideas?
How can you set umbraco form fields html tab order?
Hi
I'm building a form that has two vertical columns of form fields. The client want's it so that when you hit the tab key to move to next field it moves to the next field to the right rather than the next field below. So tab order needs to be 1 field on left, then first field on right, second field on left, second on right etc ...
I would have thought this was a fairly common requirement but I can't find any way to (or mention of) setting custom tab orders on form fields. Anyone have any ideas?
Thanks!
I would look at creating a Theme that deals with this scenario.
If you look at Views/Partials/Forms/Themes you can see you can create a new theme for how the forms render.
I would use tabindex html in the form.cshtml file.
Thanks, I was already using a theme. This is how I have solved it:
Created a new class that inherits the standard textfield
TextfieldWithTabIndex : Textfield
Added a new setting for TabIndex
Add the various back-end views required for a new fieldtype (just copies of the standard textfield view)
Added a fieldtype view that renders out the custom setting as a html input properties:
Hope this helps someone - and if there is a better / easier way please let me know!
If you have two verticau columns you can do the following:
Create for everry row a different group like this:
is working on a reply...