Hi
I am trying to record a form built with chronoform v4 in an other database built with chronoform 3.1 RC 5.5.
But i have a problem with the database field which has changed.
Recordtime became cf_created
uid became cf_uid
So when i record in the "other database" i don't have uid or recordtime.
How can i manage to transform "cf_created" into "recordtime" ?
Or i think to create "cf_created" in the "other database", get the value of it and record it in my recordtime field, but i don't really know how to do that.
If anyone can help me.
thanks
jeffnco
I am trying to record a form built with chronoform v4 in an other database built with chronoform 3.1 RC 5.5.
But i have a problem with the database field which has changed.
Recordtime became cf_created
uid became cf_uid
So when i record in the "other database" i don't have uid or recordtime.
How can i manage to transform "cf_created" into "recordtime" ?
Or i think to create "cf_created" in the "other database", get the value of it and record it in my recordtime field, but i don't really know how to do that.
If anyone can help me.
thanks
jeffnco
Hi jeffnco,
If you are no longer using CFv3 with the table then you could simple rename the columns using PHPMyAdmin (or possibly the ChronoForms Tables Manager).
Otherwise the easiest solution is simple to use a Custom Code Box to create the missing values and add them to the form data
Bob
If you are no longer using CFv3 with the table then you could simple rename the columns using PHPMyAdmin (or possibly the ChronoForms Tables Manager).
Otherwise the easiest solution is simple to use a Custom Code Box to create the missing values and add them to the form data
<?php
$form->data['recordtime'] = date('Y-m-d - H:i:s');
$form->data['uid'] = "I".substr(base64_encode(md5(rand())), 0, 16).md5(uniqid(mt_rand(), true));
?>
Bob
Hi Greyhead,
Thank you for your answer.
So with cfv4, to record the data in an other table which is created with CFv3 and if you need the field recordtime (which has been transformed into cf_created in cfv4)and uid (cf_uid in cfv4)i've created a hidden field like this and it works.
But i still have something : There is a difference of 2 hours between my 2 forms (AND there are on the same serveur).
So i'm looking for that but if somebody has an answer ...
thanks
jeffnco
Thank you for your answer.
So with cfv4, to record the data in an other table which is created with CFv3 and if you need the field recordtime (which has been transformed into cf_created in cfv4)and uid (cf_uid in cfv4)i've created a hidden field like this and it works.
<?php
$form->data['recordtime'] = date('Y-m-d - H:i:s');
$form->data['uid'] = "I".substr(base64_encode(md5(rand())), 0, 16).md5(uniqid(mt_rand(), true));
?>
<input type="hidden" value="<?php echo $recordtime ?>" id="recordtime" name="recordtime">
<input type="hidden" value="<?php echo $uid ?>" id="uid" name="uid">
But i still have something : There is a difference of 2 hours between my 2 forms (AND there are on the same serveur).
So i'm looking for that but if somebody has an answer ...
thanks
jeffnco
Hi
For the 2 hours time problem i discover that :
with joomla 1.5, php info show : default time zone = utc
with joomla 1.6, php info show : default time zone = europe/berlin
But the 2 websites are on the same serveur :/)
I've tried to set it to paris in joomla configuration but it doesn't work
I've tried to put in includes/defines.php the line : "date_default_timezone_set('Europe/Paris') ; " but it doesn't work either.
I wonder why the default time zone is not the same in the php info on the same serveur.
I'm going on to look for some issue ....
thanks to all who have a solution or something near
jeffnco
For the 2 hours time problem i discover that :
with joomla 1.5, php info show : default time zone = utc
with joomla 1.6, php info show : default time zone = europe/berlin
But the 2 websites are on the same serveur :/)
I've tried to set it to paris in joomla configuration but it doesn't work
I've tried to put in includes/defines.php the line : "date_default_timezone_set('Europe/Paris') ; " but it doesn't work either.
I wonder why the default time zone is not the same in the php info on the same serveur.
I'm going on to look for some issue ....
thanks to all who have a solution or something near
jeffnco
hi greyhead,
I haven't seen you have answered about time zone.
Thank you for reactivity and this helpfull forum.
I'm trying to understand the 2 different default_time_zone on my unique serveur.
-------------------------
Well i've tested to check hour on an article and changed the time zone from utc to paris on joomla 1.6 with cfv4. (create article > save > check hour > change time zone (to paris for me) > edit article > check hour of article)
When timezone is set to utc or paris the article change of hour : normal
But my recorded form is still 2 hours ahead when timezone is set on "paris" in joomla.
still looking for an issue to a problem which seems to be not resolved for sure for joomla 1.6.3 in others joomla forums.
Thanks
jeffnco
I haven't seen you have answered about time zone.
Thank you for reactivity and this helpfull forum.
I'm trying to understand the 2 different default_time_zone on my unique serveur.
-------------------------
Well i've tested to check hour on an article and changed the time zone from utc to paris on joomla 1.6 with cfv4. (create article > save > check hour > change time zone (to paris for me) > edit article > check hour of article)
When timezone is set to utc or paris the article change of hour : normal
But my recorded form is still 2 hours ahead when timezone is set on "paris" in joomla.
still looking for an issue to a problem which seems to be not resolved for sure for joomla 1.6.3 in others joomla forums.
Thanks
jeffnco
This topic is locked and no more replies can be posted.