Hi, I have followed the instructions described here http://fabrikar.com/forums/index.ph...dating-a-form-s-value-before-showing-the-form in order to pre-set default values of a CDD (called CDDx) in a repeated group. This CDD (CDDx) watch element option field is linked to an autocomplete dropdown (Da).
I use a php form plugin on the OnBeforeLoad event and below the code:
Until here it works like a charm, however after the page is fully loaded, the 2 CDDs (Dx) are refreshed by, I guess, Fabrik codes, and the pre-set default values of the CDDs are also refreshed.
Any ideas for what I need to do please?
I use a php form plugin on the OnBeforeLoad event and below the code:
Code:
//add 2 repetaed groups
$repeatedGroupCount["19"]="2";
JRequest::setVar("fabrik_repeat_group",$repeatedGroupCount);
// pre-set a regular field
$formModel->data['ass_donation___amount_don']=22;
// pre-set the dropdown (Da)
$formModel->data['ass_donation___donator_id']=6;
$formModel->data['ass_donation___donator_id_raw']=6;
// pre-set the CDDs (Dx) in the repeated groups
$formModel->data['ass_promesse_donation___promesse_id_raw'] = array(22654,22655);
$formModel->data['ass_promesse_donation___amount_promesse_donation'] = array(222,223);
Until here it works like a charm, however after the page is fully loaded, the 2 CDDs (Dx) are refreshed by, I guess, Fabrik codes, and the pre-set default values of the CDDs are also refreshed.
Any ideas for what I need to do please?