I don't want to apply styles to read-only fields
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-23-2024 12:50 AM
I edited the style of the field and gave it color.
However, I want the color to be gray if it is read-only as a requirement.
Styles now take precedence even if read-only.
Is there a way to reject a style if it is read-only?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-23-2024 11:15 PM
Reference fields resolved! ! !
thank you!
Next is a list type field...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-24-2024 08:49 PM
Hi @bonsai
The list type field differs from a reference field as it encompasses various element parts within a field.
To be able to provide an accurate answer, I'd need more details on how you'd like to style it.
Cheers,
Tai Vu
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-24-2024 09:28 PM
I would like to have the same state as when applying a normal style record.
If I could use "g_scratchpad.variable" in the value field of the style record, everything would be solved, but since I can't do that, I wanted to use a client-side script.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-24-2024 10:38 PM
Hi @bonsai
Within the Style from your screenshot above, if your fields are managed read-only through ACLs, you may want to give this med a try.
canWrite()
Sample.
current.test_list.canWrite();
If you still want to come with the client script you can try this below. (Isolate script is unchecked)
var select = $('select_0<table_name>.<field_name>');
var lookup = $('sys_display.<table_name>.<field_name>');
var text = $('text.value.<table_name>.<field_name>');
var edit = $('<table_name>.<field_name>_nonedit');
select.style.backgroundColor = 'green';
lookup.style.backgroundColor = 'green';
text.style.backgroundColor = 'green';
edit.style.backgroundColor = 'green';
Cheers,
Tai Vu