Hello,
I use eform like that :
[[eform2db]]
[!eForm? &noemail=`true` &formid=`updateForm` &eFormOnBeforeMailSent=`eform2db` &eFormOnBeforeFormParse=`populate_form` &tpl=`edit_form` &thankyou=`formResult` &debug=`3` !]
The hidden fields in the &tpl=`edit_form` :
<input name="caseIdForm" type="hidden" value="[+ valueId +]"/>
i populate the fields of my &tpl=`edit_form` in &eFormOnBeforeFormParse=`populate_form`
i try many things like :
$caseId = $_REQUEST["idcase"];
$modx->setPlaceholder('valueId', $caseId);
$caseId = $_REQUEST["idcase"];
$fields['caseIdForm'] = $caseId;
$caseId = $_REQUEST["idcase"];
$templates['tpl']=str_replace('[+ valueId +]', $caseId, $templates['tpl']);
I need to get the hidden input value in &eFormOnBeforeMailSent=`eform2db` to update my DB.
My
problem is that the hidden field is null or [undefined] when i try to get it in my function &eFormOnBeforeMailSent=`eform2db` :
$caseId =$fields['caseIdForm'];
But when i change the input type to "text" instead of "hidden", all works...
I really don’t understand why input type= "text" work and input type="hidden" doesn’t work...
May someone help me ?