Submission form accidentally gets submitted #4

Closed
opened 2026-03-20 16:13:16 +00:00 by Jurgen · 3 comments

This is the second time I have this issue... so odds are more people fall into this trap.

Trying to upload an episode and in the process of entering details, I accidentally press "enter" while adding tags (because of muscle memory, in other platforms tags often become a block when entering... and yes, I know: I ignored the text telling me to separate them by comma's. But tell that to my muscle memory.

Maybe the trigger to connect the enter-key to the submit form should be removed.

This is the second time I have this issue... so odds are more people fall into this trap. Trying to upload an episode and in the process of entering details, I accidentally press "enter" while adding tags (because of muscle memory, in other platforms tags often become a block when entering... and yes, I know: I ignored the text telling me to separate them by comma's. But tell that to my muscle memory. Maybe the trigger to connect the enter-key to the submit form should be removed.
Owner

The field validation is preventing Enter from been submitted until all the required fields are been filled in.

As the media can be sent attached, or as a url that requires there to be two options. HTML (to my knowledge) doesn't provide a means to make "Either Or" for the upload or the url.

@rho_n Any ideas other than javascript

<form onsubmit="
if (!A.value && !B.value) {
  A.setCustomValidity('Fill A or B');
  B.setCustomValidity('Fill A or B');
  return false;
}
A.setCustomValidity('');
B.setCustomValidity('');
">
  <input id="A" name="A">
  <input id="B" name="B">
  <button>Submit</button>
</form>
The field validation is preventing Enter from been submitted until all the required fields are been filled in. As the media can be sent attached, or as a url that requires there to be two options. HTML (to my knowledge) doesn't provide a means to make "Either Or" for the upload or the url. @rho_n Any ideas other than javascript ``` <form onsubmit=" if (!A.value && !B.value) { A.setCustomValidity('Fill A or B'); B.setCustomValidity('Fill A or B'); return false; } A.setCustomValidity(''); B.setCustomValidity(''); "> <input id="A" name="A"> <input id="B" name="B"> <button>Submit</button> </form> ```
Owner

@ken_fallon The only non-javascript method I can think of is to turn off required for those fields and then do server side validation. We are already doing javascript for other parts of the form so I don't see a problem for adding javascript for clients that use javascript, and also do server side validation for non-javascript clients. We can then add javascript to handle the situation that Jurgen experienced.

@ken_fallon The only non-javascript method I can think of is to turn off required for those fields and then do server side validation. We are already doing javascript for other parts of the form so I don't see a problem for adding javascript for clients that use javascript, and also do server side validation for non-javascript clients. We can then add javascript to handle the situation that Jurgen experienced.
Owner

Well we already have server side validation, but we can't validate anything here. As there are 3 options to sending in shows and we need to support that. I think some user training is called for here ;-)

Well we already have server side validation, but we can't validate anything here. As there are 3 options to sending in shows and we need to support that. I think some user training is called for here ;-)
Sign in to join this conversation.
3 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: HPR/hpr_website#4