• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Generate Error Message

Participant ,
Feb 20, 2021 Feb 20, 2021

Copy link to clipboard

Copied

I hope I'm posting this in the correct place. My PC crashed and I'm still rebuilding.

 

I have a form in which a user must select 3 out of five days. I have the days listed with a checkbox next to each one. If the user checks does not check exactly three boxes I would want to produce an error message.

 

I guess the easiest time to generate the message is when a "Submit" button is pressed and stop the submission.

 

Thanks.

TOPICS
How to

Views

146

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Feb 22, 2021 Feb 22, 2021

Copy link to clipboard

Copied

LATEST

I asked this question before and got no answers. As I look at the question, it's pretty muddled, so I'm going to try again.

 

One part of my form asks the user to specify "three days of the week". I have check boxes for each day. It's easy enough for me to count up the check boxes, but if the answer isn't exactly three I'm not sure how no notify the user. The form has a submit button. My thought is that when the user hits the submit button I run a bit of javascript and verify the count. If the count is correct, allow the submission (via email) to continue. If not, pop an error message.

 

I'm not sure of how to do this? I guess I need to pop an error message with a yes/no response and then conditionally submit the form.

 

Thanks

 

Jack

 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines