Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Make checkbox/dropdown Read Only depends on Radio button choice

Explorer ,
Dec 20, 2022 Dec 20, 2022

Hi, Can Someone help me create a script for this, heres the scenario:

 

I Have Radio button choice A, B, C, D

Checkbox 1 & 2 (Read Only)

Textbox 1 (Read Only)

 

If I Choose Radio Button D, Checkbox 1 & 2 will turn off Read Only, then if i choose any of the checkboxes, Textbox 1 will turn off its Read Only Property.

 

 

TOPICS
JavaScript , PDF forms
515
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Dec 20, 2022 Dec 20, 2022

As 'Mouse UP' action of radio button 'D' use this:

this.getField("Checkbox 1").readonly = false;
this.getField("Checkbox 2").readonly = false;

 

In both checkboxes as 'Mouse UP' action use this:

this.getField("Textbox 1").readonly = false;

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Dec 20, 2022 Dec 20, 2022
LATEST

When you do something like that it's important to also think of the reverse and implement it, ie. when should the field not be read-only...

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines