Reading from an array within the form data array

chriso0258 24 Feb, 2014
Hello,

My debugger information is this:

Array
(
    [chronoform] => staffid
    [event] => Page2
    [barcode] => bi01d35
    [staffid] => Array
        (
            [bi_number] => bi01d35
            [name] => My Name
        )

    [button9] => Finish
)


I'm using a custom code to display the barcode number and the name. For the barcode information I'm using the following:

Staff: {barcode}


However, I can't get the name to appear. I've tried numerous formats but I guess I'm not correctly accessing the staffid array. What format should I use to display My Name in my form?

Thanks for your help.
chriso0258 24 Feb, 2014
Thanks for your reply but I'm not trying to save the data to a db. I've read the data from the db and want to display it. I'm using a custom code element. If I use the following code:

Staff Name: {barcode} - {staffid}


I get this:

Staff Name: bi01d35 - array ( 'bi_number' => 'bi01d35', 'name' => 'My Name', )


However, what I want to see is this:
Staff Name: bi01d35 - My Name


So, how do I format the staffid array to only display My Name?
Max_admin 02 Mar, 2014
Answer
Please try
{staffid.name}


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.