Forums

DBMR array data to email fields

t1gra1rma1@ 11 Mar, 2012
Hello,

I have 2 DBMR that give me the following array according to debugger:


Array
(
    [input_submit_1] => Οριστική Υποβολή
    [4ebe242d6b8a783d304e17eef3950716] => 1
    [option] => com_chronoforms
    [view] => form
    [Itemid] => 78
    [lang] => el
    [chronoform] => submission_referees
    [event] => submit
    [personal] => Array
        (
            [0] => Array
                (
                    [email] => arxontoula@gmail.com
                    [referee] => Array
                        (
                            [gender_1] => Dear Mr.
                            [name_1] => Jim Lian
                            [email1_1] => info@eaasy.com
                            [cf_user_id] => 63
                        )

                )

        )

)


What i want to do is to send an email to email and use on email body gender_1,name_1,email1_1 and cf_user_id. if i use brackets it doesnt work. I also tried to use brackets with model names ex {referee.name_1} but still nothing.

Any idea how is thiw possible?

Ty in advance
t1gra1rma1@ 11 Mar, 2012
i found out the solution for the email body {personal.0.referee.email1_1} for example, but how can i use this in dynamic email to? if i use the above without brackets it doesn't work.
GreyHead 11 Mar, 2012
Hi t1gra1rma1@,

I don't know what Max's answer would be but here's a workaround - use a Custom Code action to re-assign the value to a new variable. You need to drag the Custom Code action up before the Email action.
<?php
$form->data['email_to'] =& $form->data['personal']['0']['referee']['email1_1'];
?>
You can then use {email_to} in the Dynamic To box.

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