Forum Moderators: open
I've got a form with two submit buttons. I'd like to hide the first one using JS and change the associated two radio buttons into automatic submits (which submit when the option is changed). However I can't just call form.submit() as I need to tell the server that the first submit button initiated the submit. Is this even possible?
Can you post some HTML code? I'm not sure what you mean by "associated two radio buttons". Also, is the submit button that you plan to hide with JS sometimes visible? That is, does some other selection on the screen control whether or not this button is visible? If not, and the button is never visible, then you don't need the button at all, do you?
Also, don't forget that if your form has any text inputs, the user can set the focus to one of those and press Enter to submit the form using the first submit button. Not sure if that will be an issue for you.