How to make alert message show when radio button is not selected

HI,

I am trying to show an alert message reminding the user to select a radio button on signup. However, the alert message does not show when I didn’t select either option of the radio button.

The signup works fine. It’s just that the alert message does not show when I click “Create Account” without selecting radio button.

Can someone please help how I can get the alert message show when radio button is not selected? Thanks.

Please see below screen shots.





Hi there, @taek… what you are trying to do is pretty simple, and the workflow to show the alert looks like it should work. One thing to note… in the second screenshot, you don’t need the condition on the workflow action because you have the condition on the event itself.

Are you sure the alert isn’t showing when no radio button is selected? I mean, could the alert be showing but be hidden by something on the page? When you say the sign up works fine, do you mean the sign up doesn’t occur if no radio button is selected and the button is clicked?

Best…
Mike

Hi @mikeloc , thank you for the reply. Frankly, I am not sure why it does not show the alert message when no radio button is selected.

The signup works fine when I click on the radio button and fill out all the information. And, if the radio button is not selected, the signup up doesn’t go thru even if all other fields are filled out.

How can I find out if the alert message is hidden by other stuff on the page? Not sure if this is the right away to see that, but I tried to make the alert message show when the “Create Account” button is clicked without having any other features. So, simply clicking the “Create Account” button triggers the alert message to show, and it works fine. The alert message stops showing when I add a condition: “RadioButtons value is empty”. Is the condition of radio buttons incorrect? Please see the previously attached second and third screenshot.

Again, it looks to me like it should work. Have you tried running the workflow in step-by-step mode to see if you can get a hint there as to why the alert is not appearing on the page?

I ran step by step and it shows as in the screen capture right below.

It says the event color is empty and so as workflow folder. Can this be an issue?

Additionally, I am sharing the screenshot of appearance, layout and conditional for the alert message in case something is not correct.



Screenshot 2022-07-19 at 8.54.24 AM

Do you see any problem?

What’s odd is that in the first screenshot, Only when is red, but it should be green if neither radio button is selected. I’m guessing this isn’t the case, but you don’t have a default value set for the radio button, do you? Can you share a screenshot of the radio button configuration?

Here they go.




Screenshot 2022-07-19 at 9.05.55 AM

Try unchecking This input should not be empty.

It works!! Thank you so much, @mikeloc! It’s great that it works, but I want to understand why the problem was there. If I want to have the radio button as a compulsory field, should it be “this input should not be empty”?

1 Like

I’m not sure I can explain exactly what is happening, but I believe it is some sort of conflict between the actual purpose of that checkbox and the way you are using it. I’m guessing the radio button element is not grouped together with the rest of the form, right? If it was and if the This input should not be empty checkbox was checked, clicking the Create Account button with no radio button selected wouldn’t run any workflows because all of the required fields have not been filled out. In your case, you are saying the radio button element is required, but you have not configured the form in a way that makes use of the checkbox in the proper manner, and I believe that was causing the issue.

Anyway, I don’t know if any of that makes sense, and maybe someone else can explain exactly what is going on, but at least it’s working now. So, you’ve got that going for you, which is nice. :slight_smile:

Got it. Thank you!

1 Like

This topic was automatically closed after 70 days. New replies are no longer allowed.