Form validation not working

(Innes Zenati) #1

Matrix Version v5.4.6.0:

I have been made aware from members of our customer service team that blank form submissions are being submitted therefore our form validation isn’t working. I have tested this internally and can submit forms (when logged out of Squiz) with all the fields blank.

Externally, on my phone, I have tested this and the validation is working.

This isn’t something we have noticed before, has anyone else encountered this issue and do you have a solution?


(Innes Zenati) #2

Had a reply from Squiz Support:

“Hi Innes,
I checked this form and in each field, in the Required Entry field option, the Optional is selected. If you want the field to be required then in this section you have to change it to the Required status. Please see attachments. At least some of the fields must be required, otherwise, the empty forms will come.”

Myself and my colleague have always built forms in a way that this field was left optional and we used a

for each field.

Do you build forms in this way and always have required selected for every field regardless of having a div class?


(Innes Zenati) #3

From looking on the manual it sounds like I need to activate client-side validation.

(Tbaatar) #4


The better implementation is to use server side validation with client side validation (JS plugin or even HTML5) as added layer for nicer error handling.

Make sure the form is actually going to the Thank You page contents as I have seen people make the mistake of ticking Confirmation Page Contents thinking this is the Confirmed State.

(Innes Zenati) #5

Thanks tbaatar, I have figured out what the issue (call on a JS function) was and has now been sorted.