Copy link to clipboard
Copied
Hello All,
I am looking at modifying a form that was origanally created in LiveCycle Designer ES 8.2. I was not the original author and as such the original author is no longer associated with this form. However, they did restrict the document to the point where I cannot modify the form without utilizing the "Print to PDF" hack, but that erased all the original data. My question is, in the original form users had the ability to type in times with no seperators, and have the field display it in the correct format, and I for the life of me cannot figure out how.
1635 = 4:35:00 PM.
Any help would be greatly appreciated.
Thanks,
Copy link to clipboard
Copied
So what kind of protection is on the PDF?
I believe all the scripts in a LiveCycle form are exposed in the document model. It's been too long since I've programmed for LC, for me to remember exactly how it's all arranged. But you should be able to extract them.
Another method might be to export the PDF as one of the XML formats that includes all the document structure and use a text editor to find the scripts.
Copy link to clipboard
Copied
Copy link to clipboard
Copied
There is no password protection. It just shows that in order to pop up the error message.
Copy link to clipboard
Copied
It kinda looks like the security dialog is indicating that there is password protection. But regarless. You can still get the existing scripts from the console window.
For example, this code will export the form definition, which contains the scripts associated with the fields:
this.exportXFAData({bXDP:true,aPackets:["template"]});
Copy link to clipboard
Copied
So...I'm new to programming/coding. Where do I input this code line?
Copy link to clipboard
Copied
Open the form in Acrobat, then press Ctrl+J to open the Javascript console. Paste in the provided code, hold down Ctrl and while pressing enter. You'll be asked to save a XDP file to the hard drive. This is the XML-based building plan of your form. You can open it with any text editor.
However, without Designer (formerly LiveCycle Designer now AEM Forms Designer), you can't edit the form at all.
Copy link to clipboard
Copied
So what is your plan for updating this form? Are you recreating it as a regular AcroForm? Or do you have the AEM Designer?
Copy link to clipboard
Copied
This can be achieved using a relatively simple Format script. You convert the user's input to a Date object, then format it to another pattern using the printd method of the util object, or the native methods of the Date object itself.
Find more inspiration, events, and resources on the new Adobe Community
Explore Now