Forums

Display message in event switcher event

Zampieri 04 Feb, 2015
Hi people. I've a event switcher with custom code that verified some field like in submit event:
<?php
if ( isset($form->data['field1']) && $form->data['field1'] ) {
  if ( strlen($form->data['field1']) < 8 || strlen($form->data['field1']) > 10 ) {
    $form->validation_errors['field1'] = "Error!";
    return "fail";
  } else {
return "success";
}
}
?>

but error is never show.
In a event switcher fail i've insert event loop that point to load
I tryed to insert a display message but never show.
Zampieri 04 Feb, 2015
Nothing help for me?
Max_admin 04 Feb, 2015
1 Likes
Hi Zampieri,

instead of:
$form->validation_errors

please use:
$form->errors


Regards,
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
Zampieri 05 Feb, 2015
YEEESSSSSSS I finisched my first Chronoforms V5! Thank's.
A little question, but where I found complete documentation with information like above?
Max_admin 06 Feb, 2015
Here on the forums or on the FAQs (tutorials), we don't have a full documentation for every feature.

Regards,
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
This topic is locked and no more replies can be posted.