Scribus Forums

Scribus => PDF Generation => Topic started by: balam on August 31, 2018, 01:43:18 AM

Title: How to disable a text field in a form using javascript
Post by: balam on August 31, 2018, 01: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 !!!
Title: Re: How to disable a text field in a form using javascript
Post by: balam on September 11, 2018, 07: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