form enabled condition based on checkbox list

lawrence whittemore asked on October 21, 2020 17:19

I have a field that is a checkbox list and have fields that depend on that list. I'm not sure how to write a condition that would make my field enabled if a specific choice is selected along with other choices from the list.

the name of the field that has depending fields is ChangesBeingReported the specific option I am looking for is "Name Change"

I need to make this field required if "Name Change" is one of the fields choices selected in the checkbox list.

Recent Answers


Dmitry Bastron answered on October 21, 2020 17:58

Hi Lawrence,

Could you provide a bit more context where you need to configure this?

  • CMS version and whether it's Portal Engine or MVC?
  • Are you configuring this for CMS admin (say, for a specific page type form or content tab) or for frontend form built with form builder?
0 votesVote for this answer Mark as a Correct answer

lawrence whittemore answered on October 21, 2020 18:33

we're in kentico 9, and it is a front end form being built with the form builder.

0 votesVote for this answer Mark as a Correct answer

Juraj Ondrus answered on October 23, 2020 15:25

You can find some more details and samples in this article. In the condition you need to use < FieldName >.Value to get the actual value of given field. Since it is a multiple choice field, then the values are stored separated by pipe (|) - so, the macro condition you need to write will be also working with the string manipulation methods and looking for desired value (like Contains(), etc.)

0 votesVote for this answer Mark as a Correct answer

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