Copy link to clipboard
Copied
Looking for a script that will prevent users from putting entries in both colum A and B of fillable pdf fields. If you put something in colum A, then nothing can go in column B. Likewise, if something is in colum B, then you can't have something in column A.
Those are 2 scripts, one for field "A" second for field "B".
Script for field "A":
this.getField("B").readonly = event.value == "" ? false : true;
Script for field "B":
this.getField("A").readonly = event.value == "" ? false : true;
Copy link to clipboard
Copied
You can set fields to readonly, lets say you have fields "A" and "B" if field "A" have value field "B" is readonly and vice versa, as validation script of:
field "A":
this.getField("B").readonly = event.value == "" ? false : true;
field "B":
this.getField("A").readonly = event.value == "" ? false : true;
Copy link to clipboard
Copied
Thank you for your response. I tried putting in the script, but it's giving me a syntax error message.
Copy link to clipboard
Copied
Can you post script you tried to use?
Copy link to clipboard
Copied
I used the script you provided, but replaced the "A" and "B" reference to my form field names.
Copy link to clipboard
Copied
Those are 2 scripts, one for field "A" second for field "B".
Script for field "A":
this.getField("B").readonly = event.value == "" ? false : true;
Script for field "B":
this.getField("A").readonly = event.value == "" ? false : true;
Copy link to clipboard
Copied
It worked! THANK YOU SO MUCH!!!