E
E
Evgeny Karpov2018-02-18 01:31:24
MODX
Evgeny Karpov, 2018-02-18 01:31:24

How to get values ​​from pdoFetch for editing before displaying them in the template?

How to get certain values ​​from a database table using pdoFetch and edit them before sending them to the chunk template?
Here is the snippet

$path = MODX_CORE_PATH . 'components/pdotools/model/pdotools/';
$pdoFetch = $modx->getService('pdofetch','pdoFetch', $path, $scriptProperties);
$pdoFetch->setConfig($scriptProperties);
return $pdoFetch->run();

it immediately displays the data from the table, but I need to change it before passing it to the chunk on the site

well, in the template itself
<input type="hidden" value="" name="test">

I need to change the displayed value from the field before it is displayed on the site.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question