Skip to main content
Participating Frequently
April 8, 2024
Question

autofill a field with time

  • April 8, 2024
  • 1 reply
  • 331 views

New to making adobe pages and could use assistance on what I assume is a beginner question.

 

I would like to know if possible and if so how:

 

I would like to have a field auto fill with the time when a check box is filled

 

Thanks in advance

R

This topic is closed to new replies. Start a new post to keep the conversation going.

1 reply

Nesa Nurani
Community Expert
Community Expert
April 8, 2024

Let's say field name is "Time", you can use this as Mouse Up action of checkbox, change "HH:MM" to the time format you want:

 

var time = util.printd("HH:MM", new Date());
this.getField("Time").value = (event.target.value == "Off") ? "" : time;