External form and validation2 users found helpful
I'm building a custom form (Done with External Form block), and i'm able to parse and validate the fields, the problem is that Concrete doesn't seem to set the fields with errors with any class, so i'm unable to highlight the errors to the user.
Is there any way to do this?
$val_msg = Loader::helper('validation/form'); $val_name = Loader::helper('validation/form'); $val_msg->setData($this->post()); $val_name->setData($this->post()); $val_msg->addRequired('fname', 'Please provide your first name'); $val_name->addRequired('fname', 'fname');
It's far from elegant, but it works.
Gotta change it for yours!! :)