Having problem using a code in CFV6

Display dynamic array data in a ChronoForms v6 email.

Overview

The issue occurs because the method to access form data changed from array syntax to a function call in CF v6.
Replace the array syntax with the correct function call using round brackets to retrieve the form field value.

Answered
Connectivity v6
Ro Ron 10 Feb, 2019
Hello
I have to get a full detail from a dynamic array to be displayed in an email but I am not able to do it. I have no problem working in CFV5 but it CFV6 it does not work.
<?php
require_once( JPATH_ROOT . DS . 'components' . DS . 'com_xyz' . DS . 'country_full_name.php' );
echo( "\n {$country_full_name[$this->data['country_name'].''.'']}" );
?>
I get the name of country in two digits from a form field. For example AU. So as per this I get from a dynamic array the full name of the country that is Australia. in CSV5. I tried to do this in CFV6 by using a custom code but I just cannot get it to work.

Could I get some help as to how could I accomplish this.

Thanks

Ron
he healyhatman 11 Feb, 2019
Answer
I thought we covered this buddy?
$this->data("fieldname");

Round brackets mate. It's a function, not an array.
Ro Ron 11 Feb, 2019
Thanks for the response . I am going to try out.
Ro Ron 11 Feb, 2019
Thanks healyhatman,

Sorry I had not noticed the round brackets earlier. It worked

Thanks again

Ron
Ro Ron 11 Feb, 2019
Hello healyhatman,

I made the changes but the round brackets dose not seem to work. I get an empty response ( blank ).

Thanks for all the help.

Ron
he healyhatman 11 Feb, 2019
Where is $country_full_name coming from and is this in a custom code block or a PHP block
Ro Ron 11 Feb, 2019
It comes from the array that has the full names . It is a custom code block
country_full_name.php
This topic is locked and no more replies can be posted.