Problem calling function in common file from Eval populate of a radiobutton or dropdown

I have a form that has references to a common PHP file. The form has onLoad and onBeforeProcess plugins and in each plug-in, the common file is declared in “PHP File”, with “Require Once” set to yes. As far as I can see, this is the right way to do it and it worked fine until I added a dropdown with an Eval populate, in the code for which I have a call to a function in the common file. Then, on posting and before onBeforeProcess ran, an error occurred:

Call to undefined function myFunctionName()
/var/www/vhosts/domain/website/components/com_fabrik/models/element.php(3937) : eval()'d code:2​

When I added a require_once reference to the common file in the dropdown’s Eval populate, the problem went away. Some time later it came back when I added a radiobutton, but went away again after I added another require_once in its Eval populate. The new radiobutton came before the dropdown in the order; it appears that a require_once is needed for the first radiobutton or dropdown in the element order. Am I right, or have I missed something?
 
We are in need of some funding.
More details.

Thank you.

Members online

No members online now.
Back
Top