- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-21-2017 01:33 AM
Hi Team,
We have check box field on form if check box is checked need to hide button without saving the form and if check box is unchecked need to show the button on form without using DOM .Any one Can help me..
Thanks
Elanraj
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-21-2017 02:32 AM
Hi Elanraja,
1) Create a UI Policy --> Set Condition as field (check_box) is true
2) In the Script tab set Run scripts true
3) In the if condition write
$$('#action_name')[0].hide(); //This will hide the top button
$$('#action_name')[1].hide(); //This will hide the bottom button as well
4) In the else condition write
$$('#action_name')[0].show(); //This will show the top button
$$('#action_name')[1].show(); //This will show the bottom button as well
For reference,
check this How to hide/show an UI action on field changes
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-29-2018 09:36 AM
This worked partially for me. I can hide the top button but not the bottom button. This works to hide the top button:
$$('#action_name')[0].show(); //This will show the top button
But when I try to hide the bottom but with $$('#action_name')[1].show(); I get an error:
Here is my ui policy:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-02-2018 07:38 AM
$$('#action_name')[2].show();
--
Thanks,
Nitish
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-10-2022 07:21 PM
Hi Nitish, it's not working for me. All of my bottom buttons still appear.. How do I do this? Thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-31-2018 05:45 AM
Hi, I have found this thread useful but I'm having problems trying to hide the 'Close' button on Change requests when State is not 'Review' and wondered if you could help please?
Adding the condition (current.change_request.state == '0' &&) to the UI action 'Close' works fine but again would prefer to do this without DOM manipulation.
As such have tried a new UI policy with condition
When to run as: State is not Review
and Run scripts as:
if true
function onCondition() {
$$('#state_model_move_to_closed')[0].hide(); //This will hide the top button
$$('#state_model_move_to_closed')[1].hide(); //This will hide the bottom button as well
}
if false
function onCondition() {
$$('#state_model_move_to_closed')[0].show(); //This will show the top button
$$('#state_model_move_to_closed')[1].show(); //This will show the bottom button as well
}
Many thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-31-2019 03:49 AM