Forum Moderators: open
The problem is when the user hits the Enter key, it uses the first button, and in most cases I want it to submit using the last one. Is there any way to specify which button is the default? I tried tabindex, and it didn't do anything.
Thanks
If the browser gets confused, then it's likely your user will be confused as well. So I'd suggest that you "don't go there" and instead try to simplify the situation. Try to sort out the logic so you have one form with one submit button that does only one thing. Simplicity and clarity.
You can perhaps address other required functions with a link that gives access to a separate form -- on a different page perhaps, or in a show/hide div situation, or even in an iframe. But whatever approach you use, to get a comfortable result you'll probably need to back up and change something that you've already assumed is a requirement. It's highly unlikely that you'll get the Enter key to work the way you would prefer.