required doesnt work

How to fix JavaScript validation failing in a ChronoForms multipage form.

Overview

The issue is caused by using a period in the form name, which conflicts with JavaScript and PHP variable naming conventions.
Rename the form to use only alphanumeric characters and underscores, avoiding special characters like periods.

Answered
Ti Tigunn 04 Jul, 2016
Hi,

I have a multipage form, he works well.
But js validation doesn't work anymore.

It's a big form with jquery script, i looked for a conflict but without success.

form: http://dev.snowdag.com/fr/produits/dossards-1-8
For testing: try quantity_serie_1 = '' on first page or email on page 2 .
If these fields are empty
js error consol said : b.match is not a function on jquery.inputmask.js (v 3.1.27, the last isnt'it?)

I tryed to remove all mask; I have no more error message. But still not asterisk, js validation and (WTF!) error messsage.

In form's setup tab, on each event, I placed items in this order: multipage, load css, custom code, load js, js validation, html render. Custom code contains php; load js contains js with jquery script (namespace jQuery, no $).
js validation works with (very) older version of my form, and with simple form.

I looking for a conflict for 2 days, please HELP !
Gr GreyHead 04 Jul, 2016
Answer
1 Likes
Hi Tigunn,

The problem might be with the form name: sport-dossards-FR-v1.8 - please try removing the . from that e.g. sport-dossards-FR-v1_8

Bob
Ti Tigunn 04 Jul, 2016
that's wonderful! you're a genius, a god!
Gr GreyHead 04 Jul, 2016
Hi Tigunn,

Good to hear that it works.

ChronoForms uses the form name in various ways in both JavaScript and PHP as a variable name and having special characters in there can break that. Best to stick to A-Za-z0-9 and underscore (dash is usually OK but can cause problems with MySQL database queries).

Bob

PS I did post this yesterday to one of the other multiple copies of you post. It looks as if Max has fixed that problem now :-)
This topic is locked and no more replies can be posted.