Forums

Forms to another database

kodyl 21 Apr, 2011
Hello,

I'm using Joomla! for my university project and Chronoforms to collect data from user through forms.
I have the forms collecting data but only in the database used by Joomla!. However, I need it to connect another local database where I have a couple of other tables. It is just for a question of scalability and not having these information (tables) mixed with the Joomla! information (table).

How can I do that?

Thank you,

Kody.
GreyHead 21 Apr, 2011
Hi Kody,

You can't use the ChronoForms DB Connection to do this but you can connect to a second MySQL database and hand-code the queries to save the data. There's a document here on how to make the connection and another in the same series on coding a custom save.

That said it might be just as easy to save the data in the Joomla! table and export or sync to the remote database form time to time.

Bob
kodyl 21 Apr, 2011
Hello Bob, thanks for your quick reply.

Alright, I saw this document but I do not know how to do that. Do I add this php code in the Form's HTML code or in a php file located in the module folder? Then does the 'DB save' function in the form wizard will allow me to select a table from the hand coded database? Then, I might not have enough programming skills to do that...

Thank you,

Kody.
GreyHead 21 Apr, 2011
Hi Kody,

I'm afraid that the docs were written for ChronoForms v3 on Joomla! 1.5 but the basic code should still work.

The code has to go into a Custom Code action in the OnSubmit event. As far as I know DB Save will not link to an external database.

Bob
kodyl 21 Apr, 2011
Yep okey, I'll see what I can do.

Thank you Bob.

Kody.
Max_admin 21 Apr, 2011
Hi,

The DB save can't save the data to any table outside the Joomla default database, but I may add this feature in the future!🙂

But if you have V4 then you can store the data to more than 1 table (inside the Joomla default DB) by using more than 1 DB save action.

Regards,
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
kodyl 21 Apr, 2011
Hi Max,

It would be a nice functionality indeed🙂
It is working with the Joomla database but I really need to use a second database for the forms' data.
So, I'm trying to make a custom code action that will save the form's data into a different local database.
Is there a file where I can find the the query used by the 'Db saver' so I can get an example?

Thank you,

Kody.
Max_admin 21 Apr, 2011
Hi Kody,

Please contact me through the "Contact Us" page to send you a new version of the file which will allow this feature🙂

Regards,
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
kodyl 22 Apr, 2011
Alright, that nice!

Thank you.

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