How to reference data from several tables in form controls with CF6

NickOg 07 Aug, 2017
Hi
I am missing something. Again!
In my form I am reading data from three related tables successfully.
[attachment=58853_20170807003752_4chrono00-png.png][/attachment]
I want to reference fields from those databases in some form fields.
In CC5 I used the form model[field] so
[attachment=58853_20170807003838_4chrono02-png.png][/attachment]

How do I do that in CF6? Can I use the same form in some way? If so how? If not that way then how?

Regards
Nick
NickOg 07 Aug, 2017
I am still stuck on this and in fact more puzzled.
Trying to sort it out I have sued this custom code in the setup tab.
<h1>read_data3.pr</h1>
{read_data3.pr:}
<h2>read_data3 via PHP</h2>
<?php
$read_data3=$this->get("read_data3");
print_r($read_data3);
echo '<hr />';
?>
<h1>rdata.pr</h1>
{data.pr:}
<h2>data via PHP</h2>
<?php
$data=$this->get("data");
print_r($data);
echo '<hr />';
?>
{data.pr:}
<?php

and I get this output

Edit Convener 2626
read_data3.pr
{read_data3.pr:}
read_data3 via PHP
Array ( [0] => Array ( [mdlComprofiler] => Array ( [id] => 2626 [firstname] => Rosie [lastname] => Adams [cb_partnerfirstname] => [cb_partnerlastname] => [approved] => 1 [cb_memberstatus] => Convener [cb_partnerstatus] => Undefined [cb_convenerstatus] => YesM [cb_ismemberconvener] => Yes [cb_ismembertechsupport] => [cb_ispartnerconvener] => [cb_ispartnertechsupport] => ) ) )
rdata.pr

Array
(
    [conn] => ManageConveners
    [comprofilerid] => 2626
    [MorP] => M
    [event] => edit
    [Itemid] => 639
    [option] => com_chronoconnectivity6
    [view] => connection
)

data via PHP

Array
(
    [conn] => ManageConveners
    [comprofilerid] => 2626
    [MorP] => M
    [event] => edit
    [Itemid] => 639
    [option] => com_chronoconnectivity6
    [view] => connection
)


So the read_data3 is loaded OK - I can print it via PHP but {read_data3.pr:} does not show that same data.

Doing the same thing with 'data' works fine. I get the same output via PHP and using {data.pr:}.

Whatever am I missing?
🙄😲
Nick
Max_admin 09 Aug, 2017
Hi Nick,

You can use {var.pr:read_data3}

To get the value in the array use {var:read_data3.path.to.data.item}

Best regards,
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
NickOg 09 Aug, 2017
1 Likes
Thanks Max - that is what I am struggling to get to work. Just about to try again. I think I see what I am missing,

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