Another JS Validation not working

Gianpaolo64 28 Oct, 2013
Hello,
I started using ChronoForms few days ago, I spent lots of time with JS validation, I read almost everything I found in the forum but I wasn't able to make it to work. I always had a JS error that prevented validation from working so I looked carefully at this JS code:
window.addEvent('domready', function() {
				document.id('chronoform_Prova').addClass('hasValidation');
  formCheck_Prova = new FormCheck('chronoform_Prova', {
    onValidateSuccess: function(){},
      display : {
        showErrors : 1,
        errorsLocation: 1
      }
    });										
  });


It uses the ID 'chronoform_Prova' but my form has no ID, so I added the following
id='chronoform_Prova'
in the "Form tag attachment" field of the form and magically everything worked.
Is this a Chronoforms bug or is it really a requirement to add that ID to all forms ?

Thanks,
Gianpaolo
GreyHead 28 Oct, 2013
Hi Gianpaolo,

Yes it is required, but normally ChronoForms adds it automatically; I think that you have to turn off the ChronoForms <form> tags and add your own for it not to be there.

Bob
This topic is locked and no more replies can be posted.