Skip to main content
Inspiring
February 3, 2022
Question

Enable a text field on the bases of a checkbox state

  • February 3, 2022
  • 1 reply
  • 216 views

How do we disabe-enable a text field on the basis of the state of a check box?

This topic has been closed for replies.

1 reply

Nesa Nurani
Community Expert
Community Expert
February 3, 2022

Lets say your text field is namesd "Text1", as 'Mouse UP' event of checkbox use this:

this.getField("Text1").readonly = event.target.value == "Off" ? false : true;