Hi,
I am facing a problem:
I have created a form + a table to save in it.
I found out two cases:
1./ Case one: if i create the database manually in phpmyadmin, then chronoform will not save the data
2./ Case two: if you generate a table using chronoform once you have created your form , then later if you modify this form to add some field, even if you update the table manually or via chronoform with the new fields, then chronoform will not save those new field.
I have tried to connecte / unconnecte / reconnect the form and the table and still nothing.
Does the only way to make this working is to delete the previous table and create a new one ?
Regards
Hi laurentmartin ,
Neither of these are true.
1) ChronoForms will work with any table provided that it has a numeric primary key and the column and table names do not contain spaces or other special characters apart from a-zA-Z0-9 and underscore.
2) If you add new columns and or inputs then, provided that the names are valid (see above) and you do a DB Refresh (see below) in CFv3 (it's not needed in CFv4) then ChronoForms will work with the new columns/inputs.
If is isn’t working for you then check the names carefully, that's usually where the problem lies.
Bob
You need to refresh the DB Connection after any changes to database column names. In the Form Editor click the DB Connection tab and set the Connection to 'No'. Click the 'Apply icon in the toolbar to save the form, open the DB Connection tab, set the Connection back to 'Yes' and re-save the form. This will refresh the copy of the table information that ChronoForms uses.
Hi, i've got the same problem. When I modify a form adding new fields, these new fields appear in the table (I can see them in the "create table" tab), but Chronoform don't save the new data in the db.
I checked the names of the fields and they are correct.
I'm using CFv4, though I tried to refresh the database too (in the Form wizard I clicked on "events", then "on Submit"/"DB Save", switched "Enabled" to no, saved, re-opened the form wizard and switched "Enabled" to yes again). It didn't solve the problem.
Any idea?
Thanks!
Hi parcs,
As far as I know it should be enough to resave the form.
If you temporarily turn site Debug on what do you see in the MySQL query that in updating your table?
Bob
Hi Grayhead,
I have the same problem. See the debug info. The formfieds are not stored!
SELECT *
FROM `j17_chronoforms`
WHERE `name` = 'aanvraagformulier'
AND `published` = '1'
SELECT *
FROM `j17_chronoform_actions`
WHERE `chronoform_id` = '1'
ORDER BY `
order`
SHOW FULL COLUMNS
FROM `j17_chronoforms_data_aanvraagformulier`
SHOW FULL COLUMNS
FROM `j17_chronoforms_data_aanvraagformulier`
INSERT INTO `j17_chronoforms_data_aanvraagformulier` (`cf_uid`,`cf_created`,`cf_ipaddress`,`cf_user_id`)
VALUES ('b5735eab11b61872d47fc6da33fb75b7','2011-11-13 19:44:30','82.157.116.51','0')
SELECT *
Overige tabellen:
2 × SHOW FULL COLUMNS FROM `j17_chronoforms_data_aanvraagformulier
1 × INSERT INTO `j17_chronoforms_data_aanvraagformulier` (`cf_uid`,`cf_created`,`cf_ipaddress`,`cf_user_id`) VALUES ('b5735eab11b61872d47fc6da33fb75b7','2011-11-13 19:44:30','82.157.116.51','0'
Hi t.vander.molen,
It looks as though those may be the only columns in the table?? By all means email or PM me the site URL and a SuperAdmin login and I'll take a quick look.
Bob
I am facing another problem on my side.
I use the following configuration:
Virtuemart + Chronoform + Bixie Vm Chrono module.
All can work well unless I try to save the data in two differents database in the same time.
If I save in only one database, then it works...
Hi Bob,
Actually I am using V3.2 not V4.
Any other suggestion ?
I am wondering if this problem doesn't come from an incompatibility with the VM Chrono Bixie module?
Regard
Hi LaurentMartin,
It's possible that there is intereference from the Bixie module but it seems unlikely to me.
If you turn on Site Debug you should be able to see the MySQL queries and get a better idea of what is happening.
Bob
Hi t.vander.molen ,
Sorry for the delay, I was away and then lost the place in this thread.
Fixed, you had the 'Save under Model ID option set to yes - in this case ChronoForms only saves data in the $form->data['model_id'] array . . . and none of your data was.
Bob
PS I see a problem with the Datepicker input validation messages. I think that there is a fix for this. Please upgrade to RC2.0 if you haven't already done so.
Thom> Thanks for your time to solve the problem!
I've the same issue, i tried to update a form that already save record in the DB. Bu the new field is not create in the DB and of course, not saved too...
I'm using the V4, have you any idea ?
Thanks
Hi Mushr00m ,
I think you'll need to use PHPMyAdmin to add the column to the table. Then re-save the form to update the form table records and it should save OK.
Bob
Hi GreyHead thanks for your help.
Do you know how to connect Chronoform to the new column table ? Do I need to give a special name to this new collumn to help chronoform to find it by himself ?
Thanks again
Hi Mushr00m ,
The column name needs to match the input name exactly.
In ChronoForms v4 you need to save the form to update the connection.
In ChronoForms v3 you need to refresh the DB Connection after any changes to database column names. In the Form Editor click the DB Connection tab and set the Connection to 'No'. Click the 'Apply icon in the toolbar to save the form, open the DB Connection tab, set the Connection back to 'Yes' and re-save the form.
Bob
Thanks it works perfectly !
Hi monray,
You need to add the new column to the database table using PHPMyAdmin.
Bob
Hi monray,
If you delete the existing table you can create a new one from ChronoForms with all of the columns. But you have to use PHPMyAdmin for the deletion.
You could create a new table with a different name if you like.
Bob
that's the problem
I believe in the ChronoForms but
not created in phpMyAdmin
and once created
when I return to
enter this field in
target
regards
Hi monray,
I'm sorry, whatever you wanted to say got lost in translation. Write in Spanish if you prefer and get Google to translate.
Lo siento, lo que quería decir se perdió en la traducción. Escribir en español si lo prefieres y obtener de Google para traducir.
Bob
Hi monray,
The simple answer is just to add the extra column in PHPMyAdmin.
To add it using the ChronoForms table creator you must delete the old table first.
Bob
Hi [email]spinarenato@tin.it[/email],
There isn't anything else required.
Try setting Site Debug on temporarily and checking the debug output to see exactly what query is being created.
It may also be worth checking that the input name and the column name are *exactly* the same.
Bob
Ok Bob, thank you very much.
I'll try it.
regards
Hi wnedoe,
If you want to add a new column to a database table then you need to do that with PHPMyAdmin (or some other database tool).
Adding a new input to your form will not make any change to the database (ChronoForms has no idea if you want to add the column or not.)
You do not want to create a new 'database', you may want to create a new table in your existing database. It only makes sense to do this if you are still developing your form and there is no useful data in the old table. If you have date that you want to keep then add anew column to that table.
The SQL query for the DB Save is automatically updated. If there is a column in your table with the same name as a value in the form results that it will be saved.
Bob