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

switching fields to readonly / acrobat reader

New Here ,
Jun 17, 2024 Jun 17, 2024

Hello, i created a form with date-fields, dropdown-lists, textfields, checkboxes and radio-buttons.

By clicking on a checkbox some of the fields must be switched to read-only state and vice versa.

By adding the following javascript code to the button-action the fields switch to read-only as intended but it only works on the PC version of acrobat pro. The form later should be used on a free version of acrobat reader on ipad. 

In acrobat reader the fields dont switch to read-only. Why does it not work on adobe reader? Is there a version/license difference causing this not to work or is there any mistake in my code?

 

if (this.getField("Check_BPL").value == "Off"){
this.getField("testfield").readonly = true;
}
if (this.getField("Check_BPL").value == "On"){
this.getField("testfield").readonly = false;
}

 

TOPICS
Acrobat SDK and JavaScript , Windows
493
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 ,
Jun 17, 2024 Jun 17, 2024

Unfortunately, most scripts won't work on mobile devices.

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
New Here ,
Jun 17, 2024 Jun 17, 2024
LATEST

Is there any other way of doing this read-only switching? 

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