UDT Validation in Formbuilder - Undefined variable: params

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Locked
squeakyduck
New Member
New Member
Posts: 4
Joined: Tue Aug 04, 2015 4:44 am

UDT Validation in Formbuilder - Undefined variable: params

Post 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.
JohnnyB
Dev Team Member
Dev Team Member
Posts: 731
Joined: Tue Nov 21, 2006 5:05 pm

Re: UDT Validation in Formbuilder - Undefined variable: para

Post 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

}
"The art of life lies in a constant readjustment to our surroundings." -Okakura Kakuzo

--
LinkedIn profile
--
I only speak/write in English so I may not translate well on International posts.
--
Jeff
Power Poster
Power Poster
Posts: 961
Joined: Mon Jan 21, 2008 5:51 pm

Re: UDT Validation in Formbuilder - Undefined variable: para

Post 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.
Locked

Return to “Modules/Add-Ons”