Forums

server side

studio16 24 Nov, 2023
Hi,
Which is the correct ss validation for V7
I used a php field in the submit action

if ( empty($this->data['customfield']) ) {
$this->errors['customfield'] = "Rquired";
return false;
}
does not work,the error is shown but the form gets submitted anyway.
adding events with fail/succes and return 'fail' ; also doesn't work.
studio16 24 Nov, 2023
Found it, it's renamed (again ;-)) into page loader

In V8 that one is also missing.
Will that be added later?
Max_admin 27 Nov, 2023
v8 has a "Valid function" validation for validating fields values, you can also switch processing using PHP action with the Events behavior
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
studio16 27 Nov, 2023
Hi Max,

The valid funcion can only be used for 1 field. In case you want to require 1 of 2 fields for example if phone or email is required.
The php action with events i noticed but i mis the page loader with process stopping functionality.
Max_admin 27 Nov, 2023
you can set an error for another field before returning "false":

$this->errors["field2"] = "The other field error message";


But of course a "stop processing" action is needed
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
studio16 27 Nov, 2023
And the stop processing action can be found where exactly? Or will it be added to a new version?
Max_admin 27 Nov, 2023
I was saying it will be added later
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
You need to login to be able to post a reply.