ChronoEngine.com homepage

Forums

Please write a review for the extension you are using on the Joomla extensions directory before posting a new question as we are being spammed by many negative reviews.

Thank you for your support!

custom Error messages for custom server side validation

stijnst 19 Apr, 2020
Hello

Building further upon this old question: I have some validations to do that seems to be too complex to use the built in validation (combining different fields, and calculations with dates). I can successfully check them using a PHP block, and an event switcher block to return the user to the form, or proceed with storing the data in the database.
However, what I'm still trying to figure out: How can I make an error message appear next to the data field that causes the validation to fail?

in Chronoforms v4 the following was possible:
$form->validation_errors['myFormField'] = "Please correct this field";
what's the v6 equivalent?

Kind regards

Stijn
Max_admin 19 Apr, 2020
There is a custom error message in v6, did you try to put your message there ?
Max
ChronoForms developer...
Did you try ChronoMyAdmin for managing your Joomla database tables ?
stijnst 19 Apr, 2020
Answer
1 Likes
Nevermind. This seems to do the trick:
$this->errors['myFormField']="Please correct this field";
This topic is locked and no more replies can be posted.

2Checkout.com

2CheckOut.com Inc. (Ohio, USA) is an authorized retailer for goods and services provided by ChronoEngine.com