Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Form Fields

New Here ,
Feb 08, 2023 Feb 08, 2023

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!!

TOPICS
PDF forms
727
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
1 ACCEPTED SOLUTION
Community Expert ,
Feb 08, 2023 Feb 08, 2023

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

View solution in original post

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Feb 08, 2023 Feb 08, 2023

- 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 = "";
}
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Feb 09, 2023 Feb 09, 2023
LATEST

Thank you! That script was perfect.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines