Custom form %form_errors% keyword is not working


(Tim Davison) #1

We are currently migrating from a Matrix v4.12 system to a Matrix v5.1 and I've come across an odd behaviour in Custom forms.  In the Page Contents, after a form is submitted, the %form_errors% keyword replacement does not seem to be doing anything.  

 

Newer keyword variants, such as %form_errors_message% and %question_error_xxx_qyy% are working fine - this is how I'm confirming there are actually submission errors.

 

Ordinarily I would use the error message on the individual question (one of the newer keywords and is working), however this is an old form that has been mirrored across and is quite complicated.  I'd prefer to not have to re-write it.  Manual indicates the keyword should be working.

 


(Bart Banda) #2

Is the form set to use the accessible format? Or the old table format? 


(Tim Davison) #3

Ah, new accessible format.  When I change it to old table format it magically works.  Is that the intended behaviour for form_errors keyword?


(Bart Banda) #4

It is intended due to the errors now being printed next to each question, otherwise you would have repeat error messages. You can use the keyword for showing a message indicating there were errors on the form if you want to print a generic error message at the top all the time.


(Tim Davison) #5

Thanks Bart.  That was a life-saver.  Perhaps a note in the manual indicating the keywords only working in certain modes is an idea?


(Bart Banda) #6

Hi Tim, there is already a note on the manuals against this keyword:

 

"This will show any errors the user may have received when they click the submit button. On the default layout these errors appear at the bottom of the page. When using the Page Contents Bodycopy you may want to show them at the top of the page. Please note that when the Accessible Format option is enabled, form question and CAPTCHA errors will be displayed next to their corresponding fields. General form errors, however, will continue to be displayed on this keyword."

http://manuals.matrix.squizsuite.net/keyword-replacements/chapters/custom-form


(Tim Davison) #7

So there is. Definitely a facepalm moment.  :)