0

I have a page with multiple <input> tags of type text like the one shown below:

<input type="text" placeholder="First Name" name="fname" id="fname" onChange="setName();" class="form-control admissionFormInput"/>

The placeholder is not being displayed on the webpage neither on Firefox nor on IE. When I do inspect element on the input the placeholder attribute itself is not present. If I manually add the attribute over there then the placeholder text displays fine. What is the issue here? Is this due to browser or Bootstrap?

EDIT 2: Here is my code: https://jsfiddle.net/LhZpX/2043/

As you can see, the HTML code contains placeholder and is correctly displayed. However on opening the file in my browser and doing inspect element on inputs, the placeholder attribute itself is missing. I have one more page with bootstrap used and that displays placeholder just fine.

Harshil Sharma
  • 2,016
  • 1
  • 29
  • 54
  • it shows there on firefox, however you added it two times. – Stickers Mar 20 '15 at 00:56
  • sorry, I only added it twice here, not in actual code. Edited. – Harshil Sharma Mar 20 '15 at 01:23
  • Post a complete code example that we can use to reproduce the problem please. – j08691 Mar 20 '15 at 01:27
  • @j08691 I have included a pastebin link. – Harshil Sharma Mar 20 '15 at 01:34
  • You need to spend some time narrowing that code block down. No one is going to want to wade through that looking for your bug. – j08691 Mar 20 '15 at 01:35
  • @j08691 you can tell me exactly what you want. The whole code is just html. COnsider just a single `input` tag in the body. – Harshil Sharma Mar 20 '15 at 01:37
  • Well, the first issue is that your pastebin has no elements that actually have a placeholder attribute. But if there were any, I'd start by removing the CSS and JavaScript and add them back one at a time and see when the problem emerges. – j08691 Mar 20 '15 at 01:40
  • Yeah, what j08691 said--your pastebin code does not have any placeholders in it at all. Post the code you're using that has the placeholders. Better yet, create a [jsfiddle](http://www.jsfiddle.net), or a [bootply](http://www.bootply.com/new) – Ted Mar 20 '15 at 13:27
  • Feel free to use [the jsFiddle in this question](http://stackoverflow.com/questions/18410922/bootstrap-3-0-popovers-and-tooltips/18537617#18537617) as the basis of your code example -- it has bootstrap libraries pre-loaded -- and you can see a working example of bootstrap tooltips. – cssyphus Mar 20 '15 at 15:28
  • Which browser are you using? Firefox on Windows shows the placeholders just fine. –  Mar 22 '15 at 10:11
  • Firefox on Windows. Neither do they show up in IE and nor in inspect element, like I never wrote them! Like I said, the other pages show it just fin thoug. – Harshil Sharma Mar 22 '15 at 12:01

0 Answers0