Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Textfield is not displaying initial value

Tags:

html

css

Ok since I'm not good with css, I am using a free css template and somewhere I messed up, because now the textfields isnt displaying an initial value.

I tested a plain textfield everywhere on the page and the value isnt showing however when I created a new html file, linked the css and created a textfield it displays the value.

Can you please point out what's causing this and how i can fix it, or explain how i can override what's causing this?

like image 744
grasshopper Avatar asked May 11 '12 03:05

grasshopper


People also ask

How do you input a field to default value?

You should rather use the attribute placeholder to give the default value to the text input field. e.g. @JoeMaffei caniuse.com refers to CSS support. The placeholder attribute is fully supported by all browsers it's just a hassle to change the default styling of it.

How do I change the default value in TextField material UI?

MUI TextField Default Value The MUI TextField can display a default value on render by using the defaultValue prop. This is useful if you don't need to externally get or set the TextField value, or if you are using a form. A form will automatically extract a TextField child components value on submit of the form.


1 Answers

TEXTAREAs do not use the value attribute. They display what is contained between the opening and closing tags.

E.g.,

<textarea name="comment">I really like this article!</textarea>
like image 189
D'Arcy Rittich Avatar answered Sep 23 '22 15:09

D'Arcy Rittich