Reference array with PHP

ideagrup 02 Jan, 2018
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:
------------------------------------------------------------------------------
Array
(
[read_data10] => Array
(
[log] => Array
(
[0] => SELECT `article`.`id` AS `article.id`, `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.

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

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

thanks
Max_admin 31 Jan, 2018
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
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.