Forums

Validation fails in custom form (CF 4.0.1 / J 3.1)

waldi 11 Sep, 2013
I created a custom form and set everything up.
One input looks like this:

<input type="text" name="name" id="name" class="validate[required]" />

I turned on "Enable JS Validation".

I guess it is an JS conflict because of the message:

Uncaught ReferenceError: required is not defined



The thing is that this is an completely clean Joomla 3 Install. There is nothing else installed and im using standard Prototype Template. I even disabled jQuery loading so this should work i guess.

Here comes the JS thats been loaded:

<script src="/site/media/system/js/mootools-core.js" type="text/javascript"></script>
<script src="/site/media/system/js/core.js" type="text/javascript"></script>
<script src="/site/media/system/js/mootools-more.js" type="text/javascript"></script>
<script src="http://localhost/site/components/com_chronoforms/js/formcheck/formcheck-yui.js" type="text/javascript"></script>
<script src="http://localhost/site/components/com_chronoforms/js/formcheck/formcheck-max.js" type="text/javascript"></script>
<script src="http://localhost/site/components/com_chronoforms/js/formcheck/lang/de.js" type="text/javascript"></script>


Thanks for any help! Waldi
waldi 18 Sep, 2013
Anyone??
GreyHead 21 Sep, 2013
Hi waldi,

Please post a link to the form so I can take a quick look.

Bob
waldi 24 Sep, 2013
I'm working on localhost. It's a fresh Joomla install.
GreyHead 24 Sep, 2013
Hi waldi,

In that case, please take a Form Backup using the icon in the Forms Manager and post it here (as a zipped file) or PM or email it to me and I'll take a closer look.

Bob
waldi 26 Sep, 2013
I have send you a backup of the form.
GreyHead 27 Sep, 2013
Hi Waldi,

I can't replicate the error you are seeing. I do see another error which happens because the code is used on a page where the 'Other' HTML isn't shown. That just needs a bit of cleaning up.

Bob
waldi 30 Sep, 2013
I don't get what you mean by:

which happens because the code is used on a page where the 'Other' HTML isn't shown.



What other HTML? There is no other HTML in the form and the page itself doesn't interfere with the form.
GreyHead 30 Sep, 2013
Hi waldi,

Sorry, I must be getting my forms mixed up. Please add '' round required
class="validate['required']"


Bob
waldi 01 Oct, 2013
Yeah that was it. Thanks. I read on the forums another notation so that caused the problem.
Thanks again!
This topic is locked and no more replies can be posted.