Forums

how to save date/time in DB?

shirzuis 28 Nov, 2011
hi there,
i am using chronoform and chornoconnetivity.

I want to cature the current date/time of form entry and then save it in DB table.
I have created a field in DB Table but can't fiqure out how t capture and save it?

Can anyone please help?
GreyHead 28 Nov, 2011
Hi shirzuis ,

If you have a 'recordtime' column in your table then ChronoForms will add the data and time to it.

Bob
shirzuis 28 Nov, 2011
Hi Bob,
Thanks for your quick reply.
I created a new field in my db Tbale jos_customer_details. but i still not getting the field filled with date/time.
can you please help.

kind regards
GreyHead 29 Nov, 2011
Hi shirzuis,

I'm sorry :-( I forgot that Max changed the column name in ChronoForms v4. Now there are two columns cf_created and cf_modified. Probably cf_created is the one to use here.

Bob
shirzuis 29 Nov, 2011
Hi Bob,

Thanks for reply, actually i am using chronoForm V3 with ChronoConnectivity.
I deleted the form and reinstall it fresh.
I followed the tutorial to create table with ChronoForm.
Now the form saves data to the table but except uid, ipaddress, recordtime .
i don't know why it's not saving it.
shirzuis 01 Dec, 2011
i still didn't get it work?
the recordtime and ipaddress is not saving in DB, i am not using email option, because i want to save it DB then retrieve it back using Chronoconectivity.
GreyHead 02 Dec, 2011
Hi shirzuis,

I don't' know either. Those three values are created automatically by ChronoForms - unless you already have form inputs with the same names. In that case the values from the form inputs are used.

Bob
shirzuis 03 Dec, 2011
Hi BOB,
Thanks for your help, but i found the solution for it. i turned the Email the results to YES, then it starts saving data into DB. therefore, without the Email the results it doesn't work, it must be enabled inorder to save those fields in to the DB.🙂
GreyHead 05 Dec, 2011
Hi shirzuis ,

That is true if you have changed the DB Connection setting to 'Before Email'. But it doesn't explain why some columns were saving and others were not.

Bob
shirzuis 05 Dec, 2011
Hi Bob,

somehow, when the email is turn off, it blocks the chronofrom-fields to get uploaded. the email turns off the recordtime, ip, uid, etc fields functions when it's off.
couldn't figure it out.
but the good thing is it works now with email ON.🙂
GreyHead 07 Dec, 2011
Hi shirzuis,

In CFv3, if Send Emails is aet to No then none of the Before Email code runs at all. It's a historic 'feature'.

Bob
This topic is locked and no more replies can be posted.