Developer forum

Forum » CMS - Standard features » Forms (datalists) misses default datetime field

Forms (datalists) misses default datetime field

Ton Martens
Reply

Hi,

Is it possible to enhance the Forms (datalists) so that every formentry gets it's datetime-stamp of the moment the form was submitted?

Without it, it's impossible to know when a form was submitted.

 

Thanks

Ton

 

 

 

 

 


Replies

 
Nicolai Høeg Pedersen
Reply

Hi Ton

 

Great idea. In the meantime you can add your own field on the database with a default value of now. This way, when a new record is added to the table, a timestamp will be present. Something like this:

 

ALTER TABLE YourFormTable ADD
	CreatedDate datetime NOT NULL CONSTRAINT DF_YourFormTable_CreatedDate DEFAULT GETDATE()

BR Nicolai

 
Ton Martens
Reply

Thanks Nicolao, 

I'll suggest your 'workaround'. Will my request automatically be on the list for RFE's? Or should I submit a case.

Sincerley,

Ton

 

 

 

 

 

 
Nicolai Høeg Pedersen
Reply

Its on the list. Do no more :-).

 

BR Nicolai

 
Ton Martens
Reply

Minor question still...:

If we add our own field for datetime directly into the database, will it show in de DW backend (form entries overview)? Because the field definitions in table DMFormField doesn't know about this field. And if we would add the field there, DW would probably insert its own default (blank) value once a form is submitted, so the constraint would not fire..

 

 
Nicolai Høeg Pedersen
Reply

Hi Ton

 

I think it will show up. But, you can just add the field and then run an alter statement on the field to set the default value when records are insterted.

 

Nicolai

 
Nuno Aguiar
Reply

Hi Nicolai,

 

Take a look at http://developer.dynamicweb-cms.com/forum/feature-requests/data-management-form-features.aspx

 

I suggested some more things a while ago.

 

Best Regards,

 

You must be logged in to post in the forum