How do I get original values in onBeforeStore PHP Plugin : Undefined variable origData

tali

Member
I used to use the $origData array to get the original values.

Now, (J!3.5.1 and up to date Fabrik through J! Update), I get
Code:
PHP Notice:  Undefined variable: origData in /home/..../plugins/fabrik_form/php/php.php(453) : eval()'d code on line 63

Is it a bug, or is there a new way to get the original datas ?
 
Great! Thank you for your reply.

It may be interesting to state that $origData is no longer an array but an object
$origData["table___field"] becomes $origData->table___field

It works (with Fabrik 3.4.3)
 
This is working for me with Fabrik 3.4.3 on a J! 3.5.1 site:

Code:
$origData = $formModel->getOrigData();
return $origData[0]->j96lk_members___j_id != {j96lk_members___j_id};
 
Just a small thing, but you should wrap single quotes round the placeholder, in case that value is empty, so it doesn't generate a syntax error.

-- hugh
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top