Page 1 of 1

UDT Validation in Formbuilder - Undefined variable: params

Posted: Tue Aug 25, 2015 12:23 am
by squeakyduck
I've got a clean install of CMSMS 1.12 and installed Formbuilder 0.8.1.1. I then created a user defined tag to be called during validation containing the following:

Code: Select all

return Array(false, 'Your message has been detected as SPAM.');
When the form is submitted, the validation works, but I receive the following error:

Code: Select all

Notice: Undefined variable: params in F:\myserver\apps\cmsmadesimple\htdocs\modules\FormBuilder\classes\Form.class.php on line 545
It seems like $params hasn't been set in the fbForm class when the Validate() function runs.

Re: UDT Validation in Formbuilder - Undefined variable: para

Posted: Tue Aug 25, 2015 5:59 pm
by JohnnyB
Have you posted the full UDT?

You can always check in your UDT too:

Code: Select all

if (isset($params)) {

// Do ya thang brother

}

Re: UDT Validation in Formbuilder - Undefined variable: para

Posted: Tue Aug 25, 2015 10:09 pm
by Jeff
squeakyduck wrote: When the form is submitted, the validation works, but I receive the following error:

Code: Select all

[b]Notice: Undefined variable[/b]: params in F:\myserver\apps\cmsmadesimple\htdocs\modules\FormBuilder\classes\Form.class.php on line 545
It seems like $params hasn't been set in the fbForm class when the Validate() function runs.
It is a Notice not an error.

It is ok to run a site with Notices displayed during setup/development, but not everyone check for Notices, so they should be turn off for a production site.