Visibility of drop down

harsh d asked on March 3, 2022 21:52

I want to display state dropdown only if user selects the country as UK and Department as HR.

  1. Department dropdown value = HR
  2. Country dropdown value = UK

Then only display the State dropdown.

Can you please guide me on how to achieve this. I am new to kentico. If you have some example then please share so that it would be very helpful.

Thank you so much...!!

Recent Answers


Dmitry Bastron answered on March 4, 2022 05:37

Hi there,

Could you please provide a bit more context around your task?

  • What version of Kentico are you using? Is it MVC or Portal Engine?
  • Where do you need to implement this? Is it a form through form builder? Or are you talking about page type configuration? If you can post a couple of screenshots that would be helpful.
0 votesVote for this answer Mark as a Correct answer

harsh d answered on March 4, 2022 19:09 (last edited on March 4, 2022 20:42)

Hi, Thank you so much for your response.

I am using kentico 13. It is a MVC application.

Yes, It is a form through form builder.

I am trying to build a form through form builder. In that form I have three dropdowns. I want to hide third dropdown. 3rd dropdown will be visible only if user selects 1st dropdown value as "HR" and 2nd dropdown value as "UK" .

I am not getting how to achieve this?


I am not able to attach screenshots as it is asking for a image link and I am not having it. Sorry...!!

I am complete new to kentico... so Can you please provide the example code also if possible...

Thank you so much for your help

0 votesVote for this answer Mark as a Correct answer

vasu yerramsetti answered on March 4, 2022 20:38 (last edited on March 4, 2022 20:50)

Kentico 13 MVC provides visibility with Always, Never and condition options on Forms--> Form builder to control form field visibility.

Refer -

  1. https://docs.xperience.io/managing-website-content/forms/composing-forms#Composingforms-Addingfieldvisibilityconditions
  2. Visibility conditions restrict the visibility of form fields based on a certain condition. See Defining field visibility conditions for more information - https://docs.xperience.io/developing-websites/form-builder-development/defining-field-visibility-conditions

Hope it helps you!!

0 votesVote for this answer Mark as a Correct answer

harsh d answered on March 5, 2022 07:13 (last edited on March 5, 2022 07:14)

Hi, thank you for your response.

I want to add two visibility conditions for a drop-down. My drop-downs visibility depends on other two fields value in the form.

In the above article they have specified only one condition.

Is it possible to have a two visibility conditions for a single field? If yes, how to do this?

0 votesVote for this answer Mark as a Correct answer

vasu yerramsetti answered on March 7, 2022 14:18

Kentico 13 default supports only one visible condition.

You need implement custom visibility condition as per your scenario - Refer the following link - How to implement Custom visibility condition for Form Builder.

https://github.com/KenticoInternal/LearningKit-Mvc/tree/master/LearningKit/FormBuilder/VisibilityConditions

0 votesVote for this answer Mark as a Correct answer

harsh d answered on March 7, 2022 21:25

Hi, But my visibility condition depends on other two fields value. This scenario is not covered anywhere in the documentation or github. Any help would be hugely appreciated.

0 votesVote for this answer Mark as a Correct answer

Dmitry Bastron answered on March 9, 2022 05:35

Unfortunately, it is not possible. The only potential workaround I could think of would be to build a separate custom form control that will contain 2 drop-downs, and then visibility condition that would depend on it.

However, in this case values from these 2 dropdowns would have to be stored in one database column.

Alternatevely, you can implement this logic completely on the frontend via JS.

0 votesVote for this answer Mark as a Correct answer

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