enigmadigital / Formerly

Plugin to allow users to create custom forms within Craft CMS
MIT License
59 stars 24 forks source link

Per question error handling. #87

Open dowadidi opened 7 years ago

dowadidi commented 7 years ago

Questions don't have an error status. It would be nice to use something like question.error in an if-statement to show a custom error message, or add an error class to the field wrapper.

Also, the submission.getAllErrors() puts out an array of strings. Not only does the order not mach the order of the fields, the array keys do not match the question ids. And the strings do not mach the custom error message added in the backend.

Matching the keys in the getAllErrors array with the question ids, would be very helpful.