Hey guys,
is it possible to use a FormIt validator to execute some JS to, say, unhide an edit box as a response to an invalidly filled field, while staying on the page?
So far, I have been trying things like
$erfolg = (!in_array($value,$filledDrawers));
if (!$erfolg) {
echo '<script type="text/javascript">showdiv("editArchivNr");hidediv("CD-Table");</script>';
$validator->addError($key,'Archivnummer ist schon belegt!');
}
return $erfolg;
That fails, the JS is ignored and the page is reloaded.
In case what I write is understandable, Is there any way to achieve what I'm aiming at?
Thanks!
[ed. note: neo2.0 last edited this post 11 years, 7 months ago.]