Hi
I'm using CF V 4 and Joomla 1.5.23.
I'm trying to connect and post to 2 tables and can only seem to post my info to one table at a time.
I have two DB SAVE elements in the events panel, and both work independently (ie if I only have one in the events area it does fine.) When I add the second, only one table gets it's info, the one listed first in the events pane.
Thanx for your help
Mark
I actually had Model ID in both elements set to the same thing "chronoform_data"
I changed one to chronoform_data2 and it works...
I would have caught that if I had read the tips a bit more closely.
Thanx again for the help.
Mark
Hi Mark,
Yes changing a Model ID will work perfectly too (though I still think it should work without having to do that).
Bob
Hi, I wish to post different fields to different table, but data to be entered in one form. How it can be done, pls?
In other way, when I drag any elements, say 'text box' - how I can assign that to any specific fields in any specific table?
Thnx in adv. Raihan
Hi Raihan,
You can use as many DB Save actions as you like, just make sure that the input names* match the column names in the table that you want to save the data into.
Bob
* Actually the names in the $form->data array that ChronoForms uses, so you can use PHP in Custom Code actions to change this if you need to.
Hi bob,
Thank you for your reply.
As u suggest me, it's working. I enabled or disabled some of the columns from alternate tables.
But, now I have add 'Add more' buttons in my form, which eventually take 5 records. But its not posting to Database. My tables having only the first record. And in the 'Create Table' showing error in field names like: 'Field name "addone_{$j}" is invalid'. I have used the example from the FAQ, to create the 'Add More' button.
What I may can do please? Thank you.
Raihan
Hi raihan,
That depends on how you plan to store the repeated data. There is another thread here with a discussion about this.
Bob