Forums

Loading multiple record loaders into the same form: 1 works!

mapme 09 Mar, 2012
Hi,

I am trying to load two DB Record Loaders into the same form.
However the values from the first table load while those from the second table do not.

I've used the debugger and it is reading the seeing the values from both tables.

Both forms are loading data from existing Chronoforms data structures, and they are all submitted by existing users. Therefore a common cf_user_id value exists for both tables. Also, I have added a hidden field called cf_user_id.

My question as follows...
Is there a simple way to load two DB Record Loaders into the same form, and use the cf_user_id to load values from both tables?

I am finding it difficult to grasp the Model Loade... in other words it will not work when trying to load the data from the second table.

Structure as follows:
Table1 is called "Personal"
- FirstName
- LastName

Table2 is called "Address"
- Address1
- Address2
- Address3

Can these be loaded into the same form using a model ID called "Personal" and a model ID called "Address"

Thanks a lot if you can solve this.
Guessing its a simple fix to do with Model Loader, but bending my brain at the moment.

Brendan
Max_admin 11 Mar, 2012
Hi Brendan,

This is absolutely fine and should work, if the debugger can see and read the data from both tables (as you mentioned) then where is the problem ?

Regards,
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
mapme 11 Mar, 2012
Not sure...
The first db record loader is reading a url parameter, while the second form is not.
Could that be it?

Cant get the curly brackets and model loader string to work at all.

Funny thing is, if I remove the first DB Record Loader then the second on works fine and loads correctly.

Could there be a conflict with my hidden fields, as two cf_IDs are different bit two cf_user_ids are the same.
Max_admin 11 Mar, 2012
what does the debugger show ? please post an example, remove any important data.

Regards,
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
mapme 11 Mar, 2012
Hi Max,
Thanks for that... have it solved.

When you mentioned it should work, I knew it was a case of figuring out something small.

By trial and error I eventually got it to work.
DB Record Loader #1 has a parameter for "Load Fields" as Yes.
DB Record Loader #2 has a parameter for "Load Fields" as No.

That was what fixed it!
Max_admin 17 Mar, 2012
No problems, yes, MAIN model should have "Load Data" = yes, all other secondary models (associated) should have it set to "No".

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.