Buy Now
Sign in

Reference array with PHP

ideagrup , January 02 at 09:15
I'm tyying cf6 and I have IMPORTANT question.

I read a record of one table. (Joomla-content for example)

IN CF6 the array is like this:
[read_data10] => Array
[log] => Array
[0] => SELECT `article`.`id` AS ``, `article`.`asset_id` AS `article.asset_id`, `article`.`title` AS `article.title` FROM `w47fa_content` AS `article` LIMIT 100;

[var] => Array
[article] => Array
[id] => 1
[asset_id] => 41
[title] => Bienvenidos a nuestra web

I like kwow what is the reference to "title" or change title
and save changes into database.

In CF5 was $form->data['article']
In CF6 I dont kwow do it

I have prove -> $this-data and different posibilities but imposible.

//chronoforms 5
$form->data['article']['title'] = "New title";

//chronoforms 6 ?????
________________['article']['title'] = "New title";


Hi ideagrup,

You can use this code:

$this->data["Article"] = $this->get("read_data10.article");​
​$this->data["Article"]["title"] = "new title";

Now you can save your data with a new "save data" action and set the data provider to {data:Article}

Best regards

If your main question got answered then please mark the answer using the button!​
​Please let us know if you have any problems with the new forums text editor, we appreciate your feedback!