Hash is not defined (form validation)

962 views
Skip to first unread message

Viper

unread,
Apr 8, 2013, 3:58:12 AM4/8/13
to joomla-de...@googlegroups.com
Hi!
I'm using the validation for my form that loads though JForm. Some fields have a validate tag e.g. <field name="captcha" type="captcha" validate="captcha" />. In template I insert JHtml::_('behavior.formvalidation'); but when I press on submit button I get an error:

Error: ReferenceError: Hash is not defined
Source File: http://localhost/media/system/js/validate-uncompressed.js
Line: 155


What's wrong?

piotr_cz

unread,
Apr 8, 2013, 8:15:24 AM4/8/13
to Joomla! General Development
validator is using MooTools class Hash (http://mootools.net/docs/more/
Types/Hash) contained in MooTools More. Looks like there's a bug and
it's not being loaded along.

Quick fix is to force it using 'JHtml::_('behavior.framework', true);'

piotr_cz

unread,
Apr 9, 2013, 3:38:19 AM4/9/13
to Joomla! General Development
Reply all
Reply to author
Forward
0 new messages