custom page type with form I need help with setting visibility conditions

Kim Tompkins asked on April 5, 2021 23:57

I am using Kentico 12 Portal. I have created a custom page type and I am trying to build out the form layout. I am using a radio button control I that I want to return the value of "One" or "Two" or even the numbers (1 or 2). I then want to use the value to display different content on the layout.

Problem 1. the value returned is always either true or false not 1 or 2 Problem 2. How to write the macro that will display the desired content based on the value of the radio button? I know how to do this if the value is true or false ( field.value ) but I'm not able to find how I do this based on the value beining 1 or 2). Hopefully this makes sense. I can provide more info. Thank you in advance

Correct Answer

Dmitry Bastron answered on April 6, 2021 10:11

Hi Kim,

What is the type (Data type) of your field? By the behaviour you are describing, it appears to be "Boolean" but should have been "Text" if you are using radio buttons with multiple values.

0 votesVote for this answer Unmark Correct answer

Recent Answers

Kim Tompkins answered on April 6, 2021 01:12

I have my radio buttons set up using a list of options and these values one;One two:Two

I can only click into the first radio button. when clicking into the second button the screen refreshes and it jumps back to the first button.

my visibility condition set as Section1ColumnCount.Value == "One" I have also tried "one"

0 votesVote for this answer Mark as a Correct answer

Kim Tompkins answered on April 6, 2021 17:26

That was exactly my problem. Thank you!!!

0 votesVote for this answer Mark as a Correct answer

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