Toggle show/hide mandatory field based on a checkbox | Community
Skip to main content
Level 3
Apr 14, 2022 11:04 AM UTC
Solved

Toggle show/hide mandatory field based on a checkbox

I want to show/hide a textfield(required: true) based on a checkbox.

Only when checkbox is enabled, textfield must be displayed 

Only when checkbox is disabled, textfield must be hidden.

 

When checkbox is disabled, I am unable to submit the dialog since textfield is a required field.

 

Expected: When checkbox is disabled, I should be able to submit the dialog even though textfield is a required field.

Please help.

Thanks in advance

 

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
arunpatidar
arunpatidarAccepted solution
New Participant
Apr 14, 2022 11:08 AM UTC

Hi,

You need to write a script to toggle required and disabled attribute for TextField on checkbox state change 

Arun Patidar

2 replies

Shashi_Mulugu
New Participant
Apr 14, 2022 5:46 PM UTC
arunpatidar
arunpatidarAccepted solution
New Participant
Apr 14, 2022 11:08 AM UTC

Hi,

You need to write a script to toggle required and disabled attribute for TextField on checkbox state change 

Translate
Arun Patidar