- 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
07-21-2022 11:14 AM
This way to hide and show a UI Action is okey, but just work whith the top button, to hide and show the bottom button, you have to add "_bottom" and change the position to 0, so the correct way is the following
To hide
$$('#action_name')[0].hide(); //This will hide the top button
$$('#action_name'_bottom)[0].hide(); //This will hide the bottom button as well
to show
$$('#action_name')[0].show(); //This will show the top button
$$('#action_name'_bottom)[0].show(); //This will show the bottom button as well
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-10-2022 06:53 PM
Hey Eduardo and all, I tried above code as well (along with above suggestions) but still not working. My requirement is simple. To hide ALL the bottom buttons. No condition.
I created onLoad client script and put the following codes but the bottom bottom still there!
function onLoad() {
//not working
//$$('div.form_action_button_container')[1].setStyle({display: 'none'});
//$$('div.form_action_button_container')[0].setStyle({display: 'none'});
//not working
//$j('.form_action_button_container').hide();
//not working either
$$('#approve_bottom')[0].hide();
$$('#reject_bottom')[0].hide();
$$('#request_approval_bottom')[0].hide();
$$('#metric_definition_thresholds_bottom')[0].hide(); //aggregate, update, copy threshold, delete
$$('#sysverb_delete_bottom')[0].hide();
$$('#metric_definition_aggregate_bottom')[0].hide();
}
can anyone help me, please?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-11-2022 08:00 AM
I just have replicated my code in my personal instance, but it doesn't work, just work in my work instance and both are in the same realese, is really strange, but there are more options to hide ui action.
1.- Throgh Ui action condition, you can write a condition to hide that button
But if you dont need conditions and you want to hide the buttons all time, you can do the following:
1.- Create a new view whit same sections and fields that the default view.
*Click in the banner menue and select configure - > form layout
*Click in view name and select new
2.- Create a view rule to redirect users to the view that you just have created.
*Type view rule in the filter navigator and select System ui -> view rules
*Click in new and fill the fields
*Be shure write the correct name of your view, the technical name of the view change to lowercase and be shure select the correct table where you view rule will applie
3.-Paste this table name in the filter navigator "sys_ui_action_view.LIST" and click on enter
*Click in the list view of the table, click in new button
*Fill the fields
UI action visibility: select the ui action you want to hide.
view: select the view you have just created
visibility: select exclude and submit the form
now, go to your form and reload:
Now, the resolve button is not in the form
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-11-2022 08:04 AM
To hide more Ui action, just follow from step 3 onwards
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-16-2022 12:26 AM
Many thanks, @Eduardo7 , unfortunately, the configuration also hide my top button. I tried the solution that you gave. What am I missing? I just want to hide bottom button. Advanced thanks!