Developer forum

Forum » CMS - Standard features » Forms (DW7 edition) module

Forms (DW7 edition) module

Jonas Mersholm
Reply

Hi. Wer using the forms (DW7 edition) module on a site. Our question is, if its possible to get a datetime on the submit of the form, without the user actually seeing it, so we can sort by creation / submit date?

 

best regards.

Jonas


Replies

 
Morten Fink Eriksen
Reply

What you can try is to insert a "getdate()" as standard value for a datefield in the forms field setup. I think that will work.

Best Regards 

Morten Fink Buchhave

 
Jacob Storgaard Jensen
Reply
This post has been marked as an answer

Hi Jonas,

If this doesn't work, create you date field as a hidden field in the module, then in your forms template semi-hardcode the value of the hidden field to <!--@Global:Server.Date.Sortable-->

This will not give you the exact date and time when the user click submit, but the time when the forms page is loaded.

To be specific you will get a date/time formatted something like this: 2011-06-20T12:28:05

If you would like a more readable format... I would create another field to hold the readable date...

Example:
<input id="<!--@Form.Fields.Creation_DateTime_Sortable.Systemname-->" type="hidden" value="<!--@Global:Server.Date.Sortable-->" name="<!--@Form.Fields.Creation_DateTime_Sortable.Systemname-->">
<input id="<!--@Form.Fields.Creation_DateTime_Readable.Systemname-->" type="hidden" value="<!--@Global:Server.Date.LongDate--> - <!--@Global:Server.Date.ShortTime-->" name="<!--@Form.Fields.Creation_DateTime_Readable.Systemname-->">

--
Regards
Jacob

 

Votes for this answer: 1

 

You must be logged in to post in the forum