Grayed out field along with UI action when user click on it.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-14-2017 12:09 PM
Hi
I have created a UI action Locked and when user click on it two field of form (start_date and end_date)should be grayed out and this UI action button Locked out should also get grayed out.
But I observed that when I reload the form then this button and required field again come into editable mode.
I am using below script :-
function set(){
g_form.setReadOnly('start_date', true);
g_form.setReadOnly('end_date', true);
document.getElementById("locked_out").disabled = true;
}
I want that user can click on Locked bbutton only once and then after it becomes grayed out and start date and end date also remains grayed out. Even after reload form.
Thanks,
Sourabh
- Labels:
-
Personal Developer Instance

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-14-2017 01:14 PM
When I say check box, I meant to say true/ false field. In your UI action, uncheck the client check-box and put this in the code
current.<field name of true/false field>=true;
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-14-2017 01:54 PM
Hi Abhinay
I have perform below activity :-
1) Create check box cb on form.
2) Create a UI action as well and mentioned condition current.cb=true;
3) Then I create a client script :-
function onLoad() {
//Type appropriate comment here, and begin script below
if(u_cb == 'true')
document.getElementById("cb").disabled = true;
}
But it is not working. Please correct me. I got the concept but not able reconnect the things.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-14-2017 02:02 PM
Your client script should be this
function onLoad() {
//Type appropriate comment here, and begin script below
if(g_form.getValue('u_cb'))
document.getElementById("cb").disabled = true;
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-06-2021 02:07 PM
Hi ALL,
I need a help for below condition, when anyone cancel the change, then other fields like "save" and "submit change" should be grayed out.
Whenever “Cancel Change” ui action clicked other UI actions like “Save” and “Submit Change” should be grayed out.