DB Multi Record Loader result in a textbox

angelmorales 15 Aug, 2014
Hello, i use the DB Multi Record Loader to load data from a different table, it displays with the Data displayer, but how can i display this data in a textbox in my form?, I put
Thanks for your help
angelmorales 15 Aug, 2014
I want to put the data in a textbox, hope you can help me
Thanks
GreyHead 15 Aug, 2014
Hi angelmorales,

You can't do it using the Data Displayer - that is designed to show a simple HTML list.

You can do it by using a Custom Code action to set a value for the Nombre_Sucursal field using the data that has been loaded.

Assuming that the DB Multi-Record loader has a Model id set of say 'ns' then it will be something like this:
<?php
$form->data['Nombre_Sucursal '] = implode("\n", $form->data['ns']);
?>
angelmorales 15 Aug, 2014
I set 'ns' in the Multi-Record Loder“s Model id,I create a Custome Code with the code you wrote,the textbox has 'Nombre_Sucursal' as Field Name,but it shows as 'Array' in the textbox, I hope i can show you but i cant attach more images.
The result its not the value of the other table the result only shows as 'Array' in the textbox
Max_admin 16 Aug, 2014
Answer
1 Likes
Hi,

Are you trying to load multiple data strings into 1 single box ? or you are loading only single field ? if you need single field then just use the "db record loader" and make sure your text box name match the database field name.

Regards,
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
angelmorales 19 Aug, 2014
That do the trick, thankyou very much!
This topic is locked and no more replies can be posted.