SOLVED - email template - Display issue - Array ( [0] =>

Status
Not open for further replies.
Hi,

I have a weird issue when I use the email template in the email plugin:

The form is a "simple" Contact Us form.

The configuration:
Joomla 3.1.5 installed on a brand new WHM/CPanel VPS.
Fabrik 3.1 github version from 29/10/2013.

I created several SQL tables to manage some drop down values and introduced them to fabrik (created lists based on these tables) - no issue.
I altered the Fabrik elements in each of the groups that Fabrik created - no issue.

I created a MySLQ view to facilitate the form creation and introduced that view to Fabrik - OK

The drop down values for some elements in the form 'Contact Us' are databasejoin.
These databasejoin elements use MySQL views specifically created in the Database.

So I have a Gender table that store all the possible values for the Salutation in the form (Mr, Mrs, Dr, Prof, etc...)
The MySQL view that I use for the drop-down will only list the active values in this table, ordered by the order column (which exists in the gender table).

I have configured the Contact Us form to use the email plugin.
The plugin is configured to use a PHP template.

When I fill in the form in the Joomla back end everything works as intended, the table is updated all right and the emails are sent BUT the values displayed in the emails are not right:
The PHP is expected to display
Dear 'Gender' 'First Name' 'Last Name',

Instead of
Dear Dr Herpette Von Derp,
it displays
Dear Array ( [0] => Dr ) Herpette Von Derp,

Any idea on how this can be fixed?

Thanks
 
Hi,

The PHP code reads like:
Code:
<p>Dear <?php print_r($this->data['fac_contact_us_form___gender_id']);?> <?php print_r($this->data['fac_contact_us_form___first_name']);?> <?php print_r($this->data['fac_contact_us_form___last_name']);?>,</p>
 
Try
Code:
<p>Dear <?php echo $this->data['fac_contact_us_form___gender_id'][0];?> <?php print_r($this->data['fac_contact_us_form___first_name']);?> <?php print_r($this->data['fac_contact_us_form___last_name']);?>,</p>
 
Status
Not open for further replies.
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top