- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-16-2023 12:58 AM
<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. .
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-16-2023 03:53 AM
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-16-2023 01:07 AM
@bonsai .
You have implemented correctly, just missed one typo (ture should be true) as mentioned below:
<textarea disabled = "true" 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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-16-2023 01:57 AM
I'm sorry. . .
The code you posted is a typo.
The actual working code is error free, but it doesn't greyed out. .
The above code also does not gray out even if you fix the mistake. .
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-16-2023 02:23 AM - edited 04-16-2023 02:26 AM
I have tried in HTML editor and it worked!
you can try in the UI page(client script) as below:
var textArea = document.getElementById("test_field");
textArea.disabled = 'true';
If it doesn't work, please share some more details of you UI page(screenshot or script will work)
If my answer solved your issue, please mark my answer as ✅ Correct & 👍Helpful based on the Impact.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-16-2023 03:20 AM
Thank you for answering!
As a trial, could you create a UI page with the following contents?
The input field is deactivated but not grayed out. .
<?xml version="1.0" encoding="utf-8" ?>
<j:jelly trim="false" xmlns:j="jelly:core" xmlns:g="glide" xmlns:j2="null" xmlns:g2="null">
<p>test
<textarea disabled = "true" id="test_field" cols="40" rows="8" maxlength="100"></textarea>
</p>
</j:jelly>