Skip to main content
Participating Frequently
March 9, 2021
Question

Assistance with the Javascript scripting

  • March 9, 2021
  • 7 replies
  • 1882 views

Hi all, I am in need assistance with the Java scripting to add a customized date field on an Adobe form please.

Adobe support cannot assist and have suggested the best solution is to post the query and the script requirements on the adobe community and see the resolution for the same.

I have Acrobat Pro DC and am having issues with formatting a date field so that when the form is pre-populated through Dynamics 365 the date format data is correct. Due to the US time zone sitting in the background of the form, and I am unable to save updates for uploading into Dynamics I have now been advised that I need to add date scripting to fix the 10hrs difference in the data being populated.

Can anyone please advise what scripting I need to use to get dd/mm/yyyy format?

This topic has been closed for replies.

7 replies

ShezzieAuthor
Participating Frequently
June 9, 2021

9/6/21 Update - Resolution 

Thank you everyone who posted assistance, this has finally been resolved.

It turned out to be an issue within Dynamics 365 and a thread (? possible the wrong word) following an update. 

I am very pleased this is now fixed and appreciate everyone's patience.

BarlaeDC
Community Expert
Community Expert
March 9, 2021

Hi,

 

Is the problem that you can't get the date in the correct format ?

OR

 

because of time differences you are getting the incorrect date populated in the field?

 

Malcolm

ShezzieAuthor
Participating Frequently
March 9, 2021

Hi Malcom, yes because of time differences you are getting the incorrect date populated in the field?

Please see my explination above, thank you for your reply, any suggestions are appreciated. 

Legend
March 9, 2021

You should understand that writing the scripts is your responsibility. We can help you learn, but you cannot expect tech support or a forum to do your work for you. You may be lucky - sometimes forum members are very generous with their time - but be prepared for serious study or perhaps paying a professional.

ShezzieAuthor
Participating Frequently
March 9, 2021

Thank you - I understand, Scripting is not in my role or expertise, I appreciate any assistance.

Nesa Nurani
Community Expert
Community Expert
March 9, 2021

If you just want to use dd/mm/yyyy format, you can set it manually, when choosing date format scroll all the way down and select custom and enter desired format.

ShezzieAuthor
Participating Frequently
March 9, 2021

Thank you Nessa, this area is not the issue, as I have done exactly as you have above. The area I need to change is in the background of the adobe form - found when you go  in request signatures : 

 

I can update this to send if I was sending it this way - However I am coding these through Dynamics 365 

The only way this can be saved is by saving it as a Template Online, Problem is once 

it saves it to the template b the form is encrypted so when I upload into Dynamics the encription stops me pulling data onto the form.

Adobe Support advised this cannot be done, however I have already coded and successfully created over 55 forms, the Date issue has only happened since October, not sure if it runs with any updates.

 

So if the date pulls from the Dynamics data, it is 10 hours behind Australian date which is an issue when comes to Date of Birth. 

ADOBE Support have advised I create a script

 

Any support is greatly appreciated 

try67
Community Expert
Community Expert
March 9, 2021

However I am coding these through Dynamics 365 

 

Then you should ask your question in a forum about this application/service. We can help you achieve it in Acrobat but there's no guarantee it will work anywhere else. In fact, it's very likely not going to work anywhere else.

JR Boulay
Community Expert
Community Expert
March 9, 2021

Convertir une date n'est pas très compliqué, il faut seulement connaitre le format de date de départ et celui d'arrivée.

Acrobate du PDF, InDesigner et Photoshopographe
ShezzieAuthor
Participating Frequently
March 9, 2021

Sorry I should have explained better, please see my explination below

try67
Community Expert
Community Expert
March 9, 2021

I moved your question to the Acrobat forum, first of all.

 

In order to help you with the code we need to better understand what you want to achieve.

What does the difference in time have to do with how the date is displayed? Do you want to add 10 hours to the date a user enters? If so, it will have to also include the time, not just the date... Or do you want to change the format of the date they're entering? If that's the case, in what format are they entering it, and what format do you want to use?

ShezzieAuthor
Participating Frequently
March 9, 2021

Thank you, my appologies, can you please give me the link to the new post ~ Thanks 

try67
Community Expert
Community Expert
March 9, 2021

It's this one. It's just under a different forum now.

Bernd Alheit
Community Expert
Community Expert
March 9, 2021

Post the question in the forum for Adobe Acrobat.

ShezzieAuthor
Participating Frequently
March 9, 2021

Thank you  - My appologies, I did not see that forum, first time on.