Forums

data not saving to table help please

GreyHead 25 Jul, 2015
Hi Andresvwt,

Please do these two things:

+ Click the Delete Cache icon in the Forms Manager toolbar.

+ Remove the crddata entry in the Model ID box of the DB Save action (in case that is being used even though Use Model ID is set to NO).

Note: the id in the form data may cause you problems. If it does you can use a Custom Code action to unset it before the DB Save
<?php
unset($form->data['id']);
?>

Bob
Andresvwt 25 Jul, 2015
I deleted cache (i did it again, because I did it before I posted this question).
I removed the cordite entry in the Model ID
I've changed the form data so it does not have "id" in it

but still the same problem

Thank you
GreyHead 25 Jul, 2015
Hi Andresvwt,

I just spotted the ñ in one of the input names. That will probably break the DB Save (and the table creation). Please replace it with n - anonacimiento

Bob
Andresvwt 25 Jul, 2015
Didn't work.
Set the Error Reporting to System to None
renamed to anodenacimiento
deleted cache again
checked the names in the table
GreyHead 25 Jul, 2015
Hi Andresvwt,

You can see that the query is being generated - but it isn't finding any data to save. Normally that is done by matching the table column names with the input names in the form data.

By all means PM me the site URL, the form name, and a SuperAdmin login and I'll take a quick look.

Bob
GreyHead 26 Jul, 2015
Hi Andresvwt,

For the CRD form the columns in the database table did not match the input names. I created a new table and the data is saving correctly.

Bob
Andresvwt 26 Jul, 2015
Thank you very much. Is it correct when I try to inspect the columns of a table to make it through "Create Table"? It's because of problems with an other table and I want to learn how to fix it.

Thank you again.
GreyHead 26 Jul, 2015
Hi Andresvwt,

You can make it through Create table - but leave out the submit button and change the data types to suit your form e.g. Age might be an Integer instead of a VarChar.

If you prefer you can use PHPMyAdmin instead, it does the same thing.

Note that if you change your form after creating the table then you must update the table to match in PHPMyAdmin (or create a new one if there is no important data saved).

Bob
Andresvwt 27 Jul, 2015
Sorry but I tried to figure out how you did it but I don't understand it at all. Although the data are saving correctly when I look for the saved records in CF, when I inspect the table in MyPHPAdmin I don't see the same column names. How do I fix a the table of a form that is not saving correctly?
Andresvwt 27 Jul, 2015
Did you create the new table with myPHPadmin? I think so because I noticed that there is another db that is working with the form. Does it mean that "create table" of CF doesn't work for me?
GreyHead 28 Jul, 2015
Hi Andresvwt,

Yes, I used the ChronoForms Create Table icon to create a table with column names that match the ones in your form so that the data will save.

Bob
Andresvwt 28 Jul, 2015
Everything working great, thank you so very much.

Andrés.
This topic is locked and no more replies can be posted.