Copy link to clipboard
Copied
I am fairly new to creating form fields and I am wondering if there are ways to do two things. The first thing I want to do is to attach a user name to a form field. For example, if someone fills out a calendar date for when a bill got sent out, Adobe will automatically attach their name to the filled field. Hopefully the name isn't visible without clicking on the field to check who filled in that part of the form.
The second thing I would like to accomplish is to disable a field if another field does not have the requisite key words. For example, if I have a date field for when money was moved from liability to revenue, that field is not active unless the invoice type contains the word "retainer". Thanks!!
Copy link to clipboard
Copied
- There's no built-in option to do it, but it might be possible with a custom-made script. However, accessing the user-name is tricky and might require installing a script on the local machine of each user.
- Yes, that's certainly possible. For example, you can use this script as the custom calculation script of "Text2" to make it only editable if "Text1" contains the word "retainer":
if (/retainer/i.test(this.getField("Text1").valueAsString)) {
event.target.readonly = false;
} else {
event.target.readonly = true;
event.value = "";
}
Copy link to clipboard
Copied
- There's no built-in option to do it, but it might be possible with a custom-made script. However, accessing the user-name is tricky and might require installing a script on the local machine of each user.
- Yes, that's certainly possible. For example, you can use this script as the custom calculation script of "Text2" to make it only editable if "Text1" contains the word "retainer":
if (/retainer/i.test(this.getField("Text1").valueAsString)) {
event.target.readonly = false;
} else {
event.target.readonly = true;
event.value = "";
}
Copy link to clipboard
Copied
Thank you! That script was perfect.

