Form php plugin does not respond to error

VickiD

New Member
Greetings:
In my php code for a form plugin I have forced an error - expecting that the configured error message would be displayed. I always get the configured success message.
The way I force an error is
$formModel->updateFormData('simaddwatchlistlog___note', 'Symbol longer than 8 characters.', true);
$formModel->getForm()->error = "Sorry Dave, that's not going to work.";
$errorfl="1";
return false;
The formdata field is not updated and there is no error.
Should I be triggering an error in another way?
Is there anywhere that php plugin errors would be logged?
Thank you.
 
The WIKI says

in order to change the main error message, which will show automatically when any of the field error messages are set, you can set:
PHP:

$formModel->getForm()->error = "Sorry, that's not going to work.";

this is only displayed if one of the _arErrors['tablemame___elementname'] values is set...

So you have to add an error message to one of your elements, too.
 
Is _arErrors a standard table? Do I build it? Is there a wiki on building the error table to which you could refer me?
Thank you.
 
Hi,
I tried adding
_arErrors['('simaddwatchlistlog___note'] value and I get an error.
_arErrors is not defined.
Any help on how / where to define it?
Thank you.
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top