I am getting a variable as $_GET['flat_id'] on the page and I want its value to ba available for a custom FormIt hook.
On the page FormIt is called as:
[[!FormItRetriever]]
[[!FormIt?
&hooks=`testCRUD`
&successMessage=`Done.`
&newFlatID=`[[!testHook]]`
]]
[[!setNewObjPlaceholders]]
Where testHook simply returns the $_GET value:
<?php
return $_GET['flat_id'];
And [[!setNewObjPlaceholders]] does nothing is the form has been submitted (so it got a value of a hidden <input>) or sets the [[fi.*]] placeholders if the page is loaded for the first time.
I'm tryibg to get the value of newFlatID in the hook as follows:
$newFlatID = $modx->getPlaceholder('newFlatID');
but $newFlatID seems to be empty.
Can anybody help?
MODX ver. 2.2.6
FormIt ver 2.2.0
[ed. note: localhot last edited this post 10 years, 10 months ago.]