Internet explorer not rendering labels

  • 26 February 2018
  • 7 replies
  • 5 views

- IE screenshot

- chrome screenshot

How do I fix it? http://national.fernwoodfitness.com.au/girlfriend/

Thanks


7 replies

Userlevel 7
Badge +1

Hi Anne-Marie!

That’s happening because Internet Explorer versions older than 9 don’t support HTML5 attributes like ‘placeholder’.

We’ve actually been working on a version of the script that will duplicate that functionality for browsers that don’t support it. Try this version instead. 😀

You’d just need to re-enter your placeholder texts at the top of the script, as in the version you’re using.

Hope that helps!

I have version 11.2 which is the most recent version. I will try the script thanks.

I couldn’t seem to get that script to work - i put it before the body tag - is that ok?

Userlevel 7
Badge +1

Hmm, if you’re on a new version of IE then I can’t think of a reason why the labels wouldn’t be showing up. I’ve looped in a member of our technical team to take a look, hang tight!

It’s getting near the end of our office hours here in Vancouver, so if you don’t hear back within the hour maybe open up a chat with our stellar support team!

HI @Jess Any news or should I contact the support team?

Userlevel 7
Badge +1

Hi again, Anne-Marie!

I did loop in @Rob from our technical team, and he did a bit of research…

The html5 placeholder attribute isn’t supported in any version of IE. It is supported in Edge back to version 10. He tested that on your page and placeholder text does work. Looks like the only way to have it on IE is with custom code. Our old workaround will work for this though:


    // Define your placeholder texts here, corresponding to Unbounce's field names
    var placeholders = {
      "first_name": "First Name",
      "last_name": "Last Name",
      "email": "Email"
    };

    // Sets the HTML5 placeholders
    for(var id in placeholders){$("#"+id).attr("placeholder",placeholders[id])}

    // Polyfill to add support for browsers like IE<=9
    if(document.createElement("input").placeholder===undefined){$("html").attr("data-placeholder-focus","false");$.getScript("//jamesallardice.github.io/Placeholders.js/assets/js/placeholders.jquery.min.js",function(){$(function(){var e=window.module.lp.form.data.validationRules;var t=window.module.lp.form.data.validationMessages;lp.jQuery.validator.addMethod("notEqual",function(e,t,n){return this.optional(t)||$(t).attr("data-placeholder-active")!=="true"||e!==n},function(e,n){return t[$(n).attr("id")].required});for(var n in placeholders){if($("#"+n).length){if(typeof t[n].required!=="undefined"){e[n].notEqual=placeholders[n]}else{e[n]={}}}}})})}

  });
</script>

‘before body end’ as per your original question

We also discovered in documentation that this should be supported in IE 11, so if you implement the changes above and the placeholders still aren’t showing up, that’s worthy of a support ticket.

Keep me posted! If it doesn’t work, I’ll let our support team know that you’ll be reaching out. 🙂

have contacted the support team thanks @Jess 🙂

Reply