HTML "textarea" cannot be grayed out even if "disabled" is specified

bonsai
Mega Sage
<p>test
		<textarea disabled = "ture"  id="test_field" cols="40" rows="8" maxlength="100"></textarea>
	</p>

 

I am trying to implement code like above on a UI page to display an input box.

I want to show a grayed out input box that doesn't accept input, but it doesn't work.

I was able to implement a function that does not accept input, but it cannot be grayed out. .

1 ACCEPTED SOLUTION

@bonsai 

 

I am not sure why it has been not grayed out for you, coz  I have used same code and it has performed both the operations for me, please update the code as mentioned below and try again!

 

 <textarea disabled="true" style="background-color: #EFEFEF" id="test_field" cols="40" rows="8" maxlength="100"></textarea>

 

If my answer solved your issue, please mark my answer as Correct & 👍Helpful based on the Impact. 

View solution in original post

8 REPLIES 8

@bonsai ,

 

Not getting your requirement, I have tried in my PDI and see below screenshot:

PrinceArora_0-1681640709061.png

Not able to add something in the text box as expected, what is your requirement?

 

My requirements are the following two

・Cannot enter input fields
・Input field greyed out

 

test1.png

 

When you enter it in the UIpage and press the [Try It] button, it will be in the following state.

 

test2.png

 

I have a problem that I can't currently gray out.

I can't enter, so I'm clearing the first one.

@bonsai 

 

I am not sure why it has been not grayed out for you, coz  I have used same code and it has performed both the operations for me, please update the code as mentioned below and try again!

 

 <textarea disabled="true" style="background-color: #EFEFEF" id="test_field" cols="40" rows="8" maxlength="100"></textarea>

 

If my answer solved your issue, please mark my answer as Correct & 👍Helpful based on the Impact. 

Once I set the style, it worked!
thank you.