user3115056
user3115056

Reputation: 1280

Unable to display value in HTML text input box

I am unable to display a text present in the value of the input text box.

On inspecting the element, I found that the text box looks like

<input type="text" value="(424) 234-3243" placeholder="Phone Number" data-format="(ddd) ddd-dddd" name="phone" class="input-medium bfh-phone width9em" id="phone">

although, there is not text message displayed on the screen.

Any unrelated change in the html, brings the text back in the screen.

Please suggest what can I do in this regard?

Upvotes: 2

Views: 1834

Answers (2)

user3115056
user3115056

Reputation: 1280

Hey thanks to all for your responses, although I found the solution to be

<input type="text" data-number="(424) 234-3243" placeholder="Phone Number" data-format="(ddd) ddd-dddd" name="phone" class="input-medium bfh-phone width9em" id="phone">

i.e. replacing the "value=" by "data-number="...:)

Upvotes: 2

Acelasi Eu
Acelasi Eu

Reputation: 914

http://jsfiddle.net/Ly3pJ/

<input type="text" value="(424) 234-3243" placeholder="Phone Number" data-format="(ddd) ddd-dddd" name="phone" class="input-medium bfh-phone width9em" id="phone">

That seems to be correct, as you could see on jsfiddle. This proves that what you did is correct. Maybe you did something in the css or jquery so that the input is empty?

Upvotes: 0

Related Questions