Page 1 of 1

CGBetterForms error query

Posted: Thu Sep 05, 2019 12:37 pm
by markS
I'm currently investigating CGBetterForms as a replacement for FormBuilder on a number of the site I manage and I really like the way it works.

I often like to highlight a field which has an error in it after it's been validated server-side. I can see that we have the $error array which has friendly error message(s). Is there any way of returning an array of errored field names? I looked in the documentation and can't see anything obvious.

I could parse the error array to pick out the field names, but I was hoping for another solution?

If this functionality doesn't yet exist I will happily make a feature request for it, maybe each item in the error array could be keyed with the field name, for example?

Thanks,

Mark.