You are viewing limited content. For full access, please sign in.

Question

Question

Autofill time in collection field when button pushed

asked on August 14, 2020

I have a use case where I have staff that needs to log a specific time that a safety check was conducted 4 times per hour. I would like to create a collection that has empty fields for the :00, :15, :30 and :45 minute mark on each hour along with a button that will autofill each field with the current time when the button is pushed. Then when they add a new row to the collection it will set the previous collection to read only so you cannot and go back to change the time once it has been inputted to the field.

Is there a way to accomplish this with javascript or another way?

0 0

Replies

replied on August 17, 2020

The easiest way is probably to set your collection or table to show read only for prior submissions.  Then have the time field on the collection (or table) auto-populate the current time.

Then during each user task, they just need to click to add the additional row (or do some simple Javascript to click the add row button when the form loads).  When they submit the task, the current time is automatically saved.

0 0
You are not allowed to follow up in this post.

Sign in to reply to this post.