Hello,
Please help me with this, i need to unset a hidden group in form based on selection made in a dropdown element. I tried to process the following code onBeforeProcess:
The value for placeholder is correctly retrieved so i guess the problem is with the unset part
Same problem using $formModel->_formData, the data is still submited to database.
The odd part is that if i add this code to the php plugin in the form, the values for joined group are no longer displayed "after unset":
Please tell me how can i do this for a non repeat group and also, for a repeat group?
Thank you
Please help me with this, i need to unset a hidden group in form based on selection made in a dropdown element. I tried to process the following code onBeforeProcess:
Code:
$solicitare = '{contracte_info_generale___tip_solicitare_raw}';
if ($solicitare[0] == 1 || $solicitare[0] == 2 || $solicitare[0] == 3 || $solicitare[0] == 5) {
unset($_REQUEST['join'][1508]);
}
The value for placeholder is correctly retrieved so i guess the problem is with the unset part
Same problem using $formModel->_formData, the data is still submited to database.
The odd part is that if i add this code to the php plugin in the form, the values for joined group are no longer displayed "after unset":
Code:
$foo = JRequest::getVar('contracte_as___alte_servicii_raw');
if ($foo[0] == '6') {
echo "<pre>before unset: ";print_r($_REQUEST);echo "</pre>";
unset($_REQUEST['join'][197]);
echo "<pre>after unset";print_r($_REQUEST);echo "</pre>";
}
Please tell me how can i do this for a non repeat group and also, for a repeat group?
Thank you