Forums

ChronoForms and Database connection

Christophe 07 Aug, 2009
Hi everybody,

I try use chronoFroms with database since yesterday. I didn't succeed!
I have already read the chronoForms tutorials.
Please help me, I'm desperate...

The Problem :
I create a from with the "From Wizard" all the fields are ok, and the configuration of Step 4 it's ok.
I didn't configure step 3 and 4 beacause I needn't mail return.
So as to connect this form with a table in my database, I follow the 5th tutorial (Saving data to the database) step by step.

At the end when I try the new form, it's don't save data in the table ...

Thanks you for your Help!
GreyHead 07 Aug, 2009
Hi Christophe,

Is the database table name showing in the Forms Manager "Tables Connected" column?

Bob
joomlawhiz 26 Sep, 2009
Hey there,

I was created my form using the Wizard. I followed the steps outlined in then "5 Saving data to the Database" tutorial. I am filling out the form, but the results are not being saved. I am trying to view the results, by clicking the table name in the "Tables Connected" column.

Here is some info:
Enable Data Storage : Yes
Saving Data/Emails order: After Email
Joomla Version 1.5.11
Chrono Contact: 3.1 RC5.5

How come the info isn't showing up?

Thanks for your help.
GreyHead 27 Sep, 2009
Hi joomlawhiz,

Impossible to tell from what you posted here but my best guess would be that the form input names and the database table column names don't match.

Bob
famblef 29 Sep, 2009
I'm having the same issue. I'm using Joomla 1.5.14. Simply put, all fields have the same name as in the table. My upload filed even works and sends files. The confirmation email works but the form won't save data in the table!

Any thoughts?

I'm using v3.1 RC5.5....

Freddie
GreyHead 29 Sep, 2009
Hi Freddie,

DB Connection isn't enabled in the DB Connection tab?

Bob
famblef 29 Sep, 2009
The enable data storage option is set to yes. Should it be different?
GreyHead 29 Sep, 2009
Hi Freddie,

It should be set to Yes and the database table selected in the drop-down.

Bob
famblef 29 Sep, 2009
Both are set as indicated....Data still won't save to the table. The file will upload but that's about it. I even tried creating a new table and connecting the existing form to it. Still didn't work....What about downgrading to a different version?

Freddie
GreyHead 30 Sep, 2009
Hi freddie,

This current release works OK, there is no problem with db connections.

Do you have dashes '-' in any of your field names? These won't work with MySQL?

If not, and the form is on-line, then by all means email or PM me a SuperAdmin login and I'll take a quick look.

Bob
famblef 30 Sep, 2009
There was a dash in the field name. I'm going to recreate the form and database with no dashes. I'll get back with you.
Thanks for your willingness to help.

Freddie
Kixsian 06 Oct, 2009
IM having issues with this as well. Table name matches up with form name. THere are no '-' in any of my field names or table rows. form submits just fine, but when i go to check my data its not there. I cant let you log in due to this being on the intranet. any ideas?
GreyHead 06 Oct, 2009
Hi Kixsian,

a) The DB Connection isn't properly enabled or the tabel name isn't selected. Set it to 'No', save teh form, then re-set it to 'Yes' and save again.

b) The table doesn't have the correct columns - check in PHPMyAdmin.

c) There is some kind of PHP Error - in Site Global Configuration set Error Reporting to Maximum and see if any error sare reported when you submit the form.

d) There is a MySQL error - in Site Global Configuration set DeBug on and check teh out pur when you submit the form to see what SQL query is being executed. Check it in PHpMyAdmin if necessary.

e) . . . ?

Bob
famblef 08 Oct, 2009
Thanks for the above. I'll start checking those things. I've further found that the table doesn't seem to have all the fields in it that my form has. It's like the fields never got created in the table. I've gone back and tried to manually create the fields to match my form but with no success.

Freddie
GreyHead 08 Oct, 2009
Hi freddie,

The Create Table dialoge uses some misleading red and green tabs and icons, you probably need to click the icon at the top right to select all the fields.

You can add extra columns to a table in PHPMyadmin but it take a little mysql knowledge.

Unless you already have important data saved the best thing to do is probably to drop the existing table and create a new one with all the fields (if you can't drop the old one then create a new one with a different name and switch the DB Connection to point to the new table).

Bob
famblef 09 Oct, 2009
That seems to have worked just fine. I created a new table to go with the form. Only thing now is the fact that the files that I have my users upload aren't saved to the location I've specified. My current work around is having a copy of the form's contents emailed to me with the attchment. Not too much of a big deal.

Thanks again,
Freddie
GreyHead 10 Oct, 2009
Hi Freddie,

The file uploads should work OK to the default upload directory. And I think they normally work OK to a specified directory provided that it is writeable.

There is a problem when copying forms to new sites that the path doesn't automatically switch to the new site. An I recall one version had a problem with custom paths - there is a fix for that somewhere if you need one.

Bob
michaelkadrie 02 Jan, 2010
For some reason I cannot create a new post on the forum so I am just replying to one that matches my problem.
I have created a connection to a database before with an older version of ChronoForms, but for some reason, it's not working on a different site with a newer version.
I have the email enabling on but that's not working either. Maybe because I am sending the form to another page?
I have attached some screen shots of my settings. My form gets sent to a page called send.php which sends all of the information to PayPal.
Look over my screen shots and let me know if you need more information or if you have any suggestions.
Thanks,
Mike
GreyHead 03 Jan, 2010
Hi adgrocks,

If your form submits to send.php then that's what happens. ChronoForms never sees it and so can't do anything with the information. Notice that the tooltip for the Redirect URL and Sumit URL boxes says "Warning : don't put anything here unless you know what you are doing".

Bob

PS I tested your permissions and was able to use the 'New Topic' button OK.
michaelkadrie 03 Jan, 2010
Bob,
On the "New Topic" subject, that's my problem - I don't see that link. I know it was there before because I used it. But now it's gone.
On my Database issue, let me tell you what I'm trying to do and you can let me know if there is a better way. I want to take the form (which is pretty intense), and input the information into a temp table in the database (I am assigning a unique ID to the submission). I then pass off certain information (including the temp number) to PayPal. After the payment is made, the user will come back to the site, hit a script that puts the temp data into a permanent table and then emails the client.
I have to do it this way because I don't want the email to go out or the information stored until the payment is made on PayPal. If they cancel the payment or if the payment is rejected, then I don't want anything to happen. I know some due diligence will need to done to clear out the temp table from time to time, but I'm ok with that. Is there another way with ChronoForms that this can be done?
The temp link to this form is found here: http://www.shekinahranch.com/joomla/index.php?option=com_chronocontact&chronoformname=campform
Thanks for your help,
Mike
michaelkadrie 05 Jan, 2010
Bob,
Just a bump.
No response in a couple of days.
Thanks,
Mike
GreyHead 05 Jan, 2010
Hi Mike,

I updated your permissions in the forum database. Doesn't make any difference that I can see but hopefully you can.

There's no great problem with what you want to do except doing it.

I would use a single table with a status flag column ('pending', 'paid', 'cancelled', etc) rather than messing with temporary tables.

You then need to use a combination of PHP and urls to control the flow.

On submission do the DB save then redirect to PayPal; use the form URL with an extra parameter like &task=send&pp=paid

In the OnSubmit code check for the parameter value and if it is there then continue with the emails etc. and update the database.

Bob
michaelkadrie 10 Jan, 2010
Bob,
I take it that this would mean create a couple of forms in ChronoForms and have them run different functions and use another PHP file to control the flow. That could work well.
This still doesn't address the original problem. The database is not data is not getting into the database. I have done this before with no problems so I have no idea why this is not working. Please refer to the images I uploaded in my earlier posts.
And, I don't like to keep harping on the new post issue. I don't doubt that I have permissions, I am just not seeing a link for it anywhere. But right now, that's the least of my worries. I really need to get that data into the database. Since this is a newer version of ChronoForms than I used before, maybe something is different with the settings. But everything looks to be ok (but you never know).
Thanks,
Mike
GreyHead 10 Jan, 2010
Hi adgrocks01,

If you want to PM or Email me a SuperAdmin login then I'll take a quick look at the site.

The New Topic link only shows up at the Forum View level:
[attachment=0]10-01-2010 11-42-34.png[/attachment]

Bob
dostergaard 21 Jan, 2010
Sorry to pile on here but I am also having a problem getting my form to save data to the database. I have followed all of the advice posted on this topic and still "no joy."

The have dropped and recreated the table. (several times) I even tried deleting and recreating the entire form. I also altered the table to allow nulls for all fields except the primary key.

The form includes a file upload field and the file gets uploaded fine.

I am using Chronoforms 3.1 RC5.5 on Joomla 1.5.14 with MySQL 5.0.45

Any help or hints would be appreciated.

Thanks,
Dean
GreyHead 21 Jan, 2010
Hi Dean,

It just works - unless it doesn't, which usually means a wrong setting.

[sendfb][/sendfb]
Bob
dostergaard 02 Feb, 2010
Hi Bob,

Here is the zipped form backup. I sent this before via email but it must have gotten filtered or something. I happily got distracted by other work but now I need to get back to solve this problem.

There is another form on the site that seems to save data just fine. I've tried going field by field to resolve any differences. The other form doesn't include a file upload field, but that is the only material difference I can see.

BTW on this broken form the file upload works fine, the data just doesn't get saved to the database.

Thanks,
Dean
GreyHead 06 Feb, 2010
Hi Dean,

Sorry, I over looked this - the problem is that you have the DB Connection set to 'Before Email' but don't have emails enabled on the General tab.

If Emails aren't enabled then a historic quirk of ChronoForms means that anything Before Email doesn't get executed.

Reset the DB Connection to the defaulr 'After Email' and all should be well.

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