Dynamic Disable Property Based on Checkbox in Xperience by Kentico Widget
I have two properties in my Xperience by Kentico widget:
CheckBoxComponent:
[CheckBoxComponent(Order = 11, Label = "Set same settings as Desktop for Tab")]
NumberInputComponent:
[NumberInputComponent(Order = 13, Label = "Slides To Scroll", Disabled = true)]
I want to dynamically set the Disabled
value of the NumberInputComponent
based on the CheckBoxComponent
. If the checkbox is true
, then the NumberInputComponent
should be disabled, and if it's false
, the NumberInputComponent
should be enabled.
How can I achieve this in Xperience by Kentico?
Environment
- Xperience by Kentico version: [29.4.3]
- .NET version: [8]
- Deployment environment: [Azure]
- Link to relevant Xperience by Kentico documentation
Answers
You could use a configurator to dynamically change values, properties, visibility conditions, and validation rules for a widget property. I'm not sure if this allows you to change the disabled/enabled status.
You could also add a visibility condition which could show/hide the field based on value of a preceeding property.
If those don't solve your issue then you'll need to make a custom UI Form Component which could toggle between enabled/disabled using a configurator.
To answer this question, you have to login first.