I need a field to be populated with the current time of the tablet it is being filed on

New Here ,
Mar 07, 2018 Mar 07, 2018

Copy link to clipboard

Copied

i need a "start time" field to be field with the current time once its clicked on

time must come from  the  tablet (android if relevant) it is being filled on

TOPICS
Acrobat SDK and JavaScript

Views

97

Likes

translate

Translate

Translate

Report

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
Most Valuable Participant ,
Mar 07, 2018 Mar 07, 2018

Copy link to clipboard

Copied

The code to do it is:

this.getField("Field name").value = util.printd("mm/dd/yyyy HH:MM", new Date());

However, there's no guarantee it will work on a mobile device.

Likes

translate

Translate

Translate

Report

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 ,
Mar 07, 2018 Mar 07, 2018

Copy link to clipboard

Copied

How do i decide of when the time is recorded?  it need to happen when the user clicks the box

Likes

translate

Translate

Translate

Report

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
Most Valuable Participant ,
Mar 07, 2018 Mar 07, 2018

Copy link to clipboard

Copied

Then attach the code to the button's Mouse Up event.

Likes

translate

Translate

Translate

Report

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