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

Question

Question

Format field in forms for date/time

asked on April 4, 2018

Hi there, I have searched high and low and I can't find a specific answer to this question. I need to first format several fields in my form to reflect a date/time value from a db (that has the data in date/time format). Format is dd/mm/yyyy hh:mm:ss (no AM/PM - military time). Secondly, I need to be able to input a field in my form in that same format. I am temporarily using a date field with time shown, but ideally I would like to have them enter it in the same format as above.

0 0

Replies

replied on April 4, 2018

What version of Forms are you on?

0 0
replied on April 4, 2018

Laserfiche Forms Professional Version 10.2.1.205

0 0
replied on April 4, 2018 Show version history

Hi Frank, for the field being populated by the db, you would likely need to have the field be a Single Line Field, and then use JS to fix the formatting of the field if it does not display correctly.

For the input field, another Single Line field but then use the regex validation to control the input of the data, or do the date and time as separate fields ( with regex validation) and then concatenate the fields together into the string you want.

0 0
replied on April 4, 2018

Sorry, I am a total newbie at this. I understand what you are telling me to do, but working with the JS and Regex formats is still a little baffling to me. Any chance you could provide examples or link me to some specific for date/time? Thanks so much!

0 0
replied on April 5, 2018

do date and time have to be in the same field?  I have a filter you could use only the date and time would need to be separate.  

0 0
replied on April 6, 2018

No, I need to have them in the same field unfortunately. Thanks though.

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

Sign in to reply to this post.