Wednesday, 15 September 2010

magento hide validation message -



magento hide validation message -

on magento site, validation done prototype validation. everytime validation fails, error message field appears. start typing in field error message fades out. want fade out error message if user clicks anywhere in form. link javascript file

https://github.com/atetlaw/really-easy-field-validation/blob/master/validation.js

in next snippet remember replace form_id id of form.

class="lang-js prettyprint-override">event.on('form_id', 'click', function() { // fall plain hiding if cannot fade var hide = self.effect && effect.fade || element.hide; // = form beingness watched this.select('.validation-advice').each(hide); });

validation magento prototypejs

No comments:

Post a Comment