Skip to main content
Participating Frequently
May 20, 2025
Question

Time input

  • May 20, 2025
  • 2 replies
  • 560 views

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,

2 replies

try67
Community Expert
Community Expert
May 21, 2025

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.

Thom Parker
Community Expert
Community Expert
May 20, 2025

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.  

 

 

Thom Parker - Software Developer at PDFScriptingUse the Acrobat JavaScript Reference early and often
Participating Frequently
May 20, 2025