Scribusoid

Author Topic: How to disable a text field in a form using javascript  (Read 186 times)

balam

  • Newbie
  • *
  • Posts: 2
  • Karma: 0
  • Scribus User
How to disable a text field in a form using javascript
« on: August 31, 2018, 02:43:18 am »
In the Action tab of a Combo Box, I want to use Javascript to disable a text field when I select a specific Combo Box option.

I have tried unsuccessfully with the following lines:

this.getField('foo').disabled = true;
this.getField('foo').readOnly = true;


Thanks for the help !!!
« Last Edit: August 31, 2018, 06:13:57 pm by balam »

balam

  • Newbie
  • *
  • Posts: 2
  • Karma: 0
  • Scribus User
Re: How to disable a text field in a form using javascript
« Reply #1 on: September 11, 2018, 08:22:19 pm »
The solution is:

this.getField('foo').readonly = true;

JavaScript for Acrobat API Reference:

https://www.adobe.com/content/dam/acom/en/devnet/acrobat/pdfs/js_api_reference.pdf

 

palmate