How do I add a date\time field to form

Post any questions you have about using the Verj.io Studio, including client and server-side programming with Javascript or FPL, and integration with databases, web services etc.

Moderators: Jon, Steve, Ian, Dave

Northerner1
Ebase User
Posts: 3
Joined: Fri Aug 09, 2013 1:15 pm

How do I add a date\time field to form

#1

Postby Northerner1 » Thu Sep 12, 2013 4:14 pm

I have created a form which allows users to enter faults to a database, what I would like to have is a filed in the fault log which records the date and time of the record.
0 x

Jon
Moderator
Moderator
Posts: 1342
Joined: Wed Sep 12, 2007 12:49 pm

#2

Postby Jon » Fri Sep 13, 2013 7:57 am

Create a field then set the field type to DateTime. Create a script to run at the appropriate time - when the user clicks submit button? - then set the current date and time like this:

Code: Select all

fields.DATE_TIME_FIELD.value = new Date();
You can map this field to database timestamp or date columns when inserting to the database.

This post should be in the Ebase Application Development Category - this category is for product enhancement suggestions.

Regards
Jon
0 x

Northerner1
Ebase User
Posts: 3
Joined: Fri Aug 09, 2013 1:15 pm

Date time field in new record

#3

Postby Northerner1 » Fri Sep 13, 2013 10:51 am

Thanks Jon that's worked. I will post on Development next time.
0 x


Who is online

Users browsing this forum: No registered users and 17 guests