Set radio button option to display custom message and not submit form if selected

Liz B asked on April 29, 2019 22:41

I built a form in the admin using custom fields with one being the radio buttons form control. I have it set to be Yes or No. If a user selects "No" then there should be a custom message for them and they should not be able to submit the form. I don't know how to do this. Do I have to write custom macros in the visibility condition / enabled condition?

Recent Answers


Dmitry Bastron answered on April 30, 2019 10:57

Hi Liz,

In the Form Builder you can do it this way (example below is from Kentico MVC but should work with Portal Engine as well)

Add new radio buttons control to the form (the default value might be important) 1

Add the Validation rule 2

And here is how it will look on the frontend 3

Hope it will help!

1 votesVote for this answer Mark as a Correct answer

Liz B answered on May 1, 2019 00:37

Thank you for your response, but will it still let a user submit the form even after selecting No? The form shouldn't let you submit if you select No and for Yes I have it so you get an extra form field to add a number. I have the fields and messages showing up using visibility conditions when selecting "Yes" or "No" but I'm not sure how to set it up so the form won't submit if selecting "No."

0 votesVote for this answer Mark as a Correct answer

Dmitry Bastron answered on May 1, 2019 00:46

In my example it's impossible to submit the form until you select 'yes'. It is driven by validation rule with 'Yes' regular expression. Is it working for you? Have you tried?

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.