save to db?

vistech 26 Feb, 2013
How do I save submissions to the db with chronocontact?
GreyHead 01 Mar, 2013
Hi vistech,

As far as I can see you can't - you'd need to use ChronoForms if saving to the DB is a requirement.

Bob
vistech 01 Mar, 2013
How do I get a definitive answer?
GreyHead 01 Mar, 2013
Hi Vistech,

We'll have to ask Max, I'll check on your other question in the morning and then drop him a note. He often visits here at the weekend so may pick it up before then.

Bob
Max_admin 02 Mar, 2013
Hi,

If you have the table in your database, then ChronoContact is built using a framework which makes it easy to do any database operation, you can use the code below in the custom code box:


<?php
\GCore\Libs\Model::generateModel('Test', array('tablename' => 'your_table_name'));
\GCore\Models\Test::getInstance()->save($form->data);
?>


Please note that if the table's primary key value is passed in the data array then the function will try to update a record with that value, but if you want to disable this feature then let me know and I can tell you the setting to disable this.

I hope this helps.

Regards,
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
vistech 04 Mar, 2013
So there is no way to easily add the new table in the db like chronoforms? I thought this would be a no brainer to be added to chronocontact from chronoforms...
Max_admin 10 Mar, 2013
Hi vistech,

You can simply build the table in phpmyadmin then use the code here, we are not going to copy any code from Chronoforms here, ChronoContact is different and is using different techniques, but I will try to add this feature to the next version, you may check with me through the "Contact us" page if you want to get the next installer.

Regards,
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
This topic is locked and no more replies can be posted.