ThierryM
Member
Hi,
I want to use a plug-in php in form with OnBeforeProcess.
All it's working, except the instructions into the conditionnal "if" (with or without "else") :
The $usep variable contain the correct value (0 or 1).
and if I erase the condition, the alone line updateFormData works :
So I think I make a mistake but I don't see where... Or is this maybe a bug ?
Thanks for your help, regards
I want to use a plug-in php in form with OnBeforeProcess.
Code:
//permet de r?cup?rer la valeur du groupe "josto_adhesions_gestion"
$usep=$formModel->formData['josto_adhesions_gestion___usep'];
//Harmonise la valeur du champ 'cb_usep' avec celui du groupe "josto_adhesions_gestion"
$formModel->updateFormData('josto_comprofiler___cb_usep',$usep,true);
//echo "<pre>";print_r($usep);exit;
if ($usep === 1)
{
$formModel->updateFormData('josto_user_usergroup_map___group_id',27,true);
}
else {
$formModel->updateFormData('josto_user_usergroup_map___group_id',26,true);
}
All it's working, except the instructions into the conditionnal "if" (with or without "else") :
The $usep variable contain the correct value (0 or 1).
and if I erase the condition, the alone line updateFormData works :
Code:
$formModel->updateFormData('josto_user_usergroup_map___group_id',27,true);
So I think I make a mistake but I don't see where... Or is this maybe a bug ?
Thanks for your help, regards