Skip to main content
Participant
June 17, 2024
Question

switching fields to readonly / acrobat reader

  • June 17, 2024
  • 1 reply
  • 436 views

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;
}

 

This topic has been closed for replies.

1 reply

try67
Community Expert
Community Expert
June 17, 2024

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

Participant
June 18, 2024

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