Copy link to clipboard
Copied
Howdy,
I did my best to locate how to edit a text field property via javascript in this guide:
https://www.adobe.com/content/dam/acom/en/devnet/acrobat/pdfs/js_developer_guide.pdf
My situation:
Currently, I am using javascript to copy each field in a pdf, copy all of its attributes under a new name, and replace the old field. (Thanks to the way copying a field works. IE it keeps the same name and entering information into the original field duplicates that data into the copied fields as well. Cannot manually change the names of 500+ fields daily..) I got the script to run great with one problem. Text Fields can have a format category of "Date," and I cannot seem to figure out how to set this attribute when I create the object via javascript (the fields dont have the calendar option to the right of them, they are just regular text boxes).
Example of what I am looking for:
var f = this.addField("coolname", "text", 0, [200, 250, 250, 400]);
f.format = "date";
Hope this was clear, thanks for the help!
Copy link to clipboard
Copied
Hi,
Please view this thread and use the guide provided in the suggestions:
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Ooooh! ok that is too easy. just select date field add it to your document like you would for a text field. You can also add a text field and in the field Properties go to the Format tab and select from the pulldown DATE. You can choose any of the pre-selected date formats that are listed there or provide a custom date format. So when your user inputs a date, like for example, let's say he/she types in "9sep" and hit enter it will adjust automatically and complete the date using the format that you specified for that field; the same will happen if the user choose a date from the date picker... I think this is what is referred to arbitrary masking (someone please correct me if I am wrong)
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Find more inspiration, events, and resources on the new Adobe Community
Explore Now