non-empty fields invalid (email/phone/date) [Theme conflict – WP Foundation]
-
Hello,
I wanted to share a theme conflict with WP Foundation;
https://github.com/320press/wordpress-foundation/issues/42The following theme code in library/js/scripts.js causes an issue with email/phone/date fields as it’s seen as invalid format since placeholder text is added as value to the input fields;
// Input placeholder text fix for IE $('[placeholder]').focus(function() { var input = $(this); if (input.val() == input.attr('placeholder')) { input.val(''); input.removeClass('placeholder'); } }).blur(function() { var input = $(this); if (input.val() == '' || input.val() == input.attr('placeholder')) { input.addClass('placeholder'); input.val(input.attr('placeholder')); } }).blur();
Hope this is helpful to someone with the same issue, I’ve just commented/removed from my theme to correct the validation errors.
All the best,
Cheers
- The topic ‘non-empty fields invalid (email/phone/date) [Theme conflict – WP Foundation]’ is closed to new replies.