Please teach me how to use this global function :-)
This code can be used in global functions and I want to make use of it. I know I can call it from a Form/Tab as needed but how?
"--- This controls the HUD icons top right ---";
function UIHide(options : text) do
var html := "";
for items in split(options, ",") do
html := html +
switch items do
case "print":
"<style>div.hud-menu-button.i-32-24.i-light-grey.i-setting-print{display: none;}</style>"
case "trash":
"<style>div.hud-menu-button.i-32-24.i-light-grey.i-setting-trash{display: none;}</style>"
case "copy":
"<style>div.hud-menu-button.i-32-24.i-light-grey.i-setting-copy{display: none;}</style>"
case "add":
"<style>div.hud-menu-button.i-32-24.i-light-grey.i-setting-add{display: none;}</style>"
case "line":
"<style>div.component.br{display: none;}</style>"
default:
""
end
end;
html
end;
function UIShow(options : text) do
var html := "";
for items in split(options, ",") do
html := html +
switch items do
case "print":
"<style>div.hud-menu-button.i-32-24.i-light-grey.i-setting-print{display: inline;}</style>"
case "trash":
"<style>div.hud-menu-button.i-32-24.i-light-grey.i-setting-trash{display: inline;}</style>"
case "copy":
"<style>div.hud-menu-button.i-32-24.i-light-grey.i-setting-copy{display: inline;}</style>"
case "add":
"<style>div.hud-menu-button.i-32-24.i-light-grey.i-setting-add{display: inline;}</style>"
case "line":
"<style>div.component.br{display: none;}</style>"
default:
""
end
end;
html
end
9 replies
-
Looks to me like you can just
UIHide("print,trash,add")
-
Okay. So I add a formula field and paste this in:
UIHide("print,trash,add")
Nothing happens apart from the formula displays:
<style>div.hud-menu-button.i-32-24.i-light-grey.i-setting-print{display: none;}</style><style>div.hud-menu-button.i-32-24.i-light-grey.i-setting-trash{display: none;}</style><style>div.hud-menu-button.i-32-24.i-light-grey.i-setting-add{display: none;}</style>
All the icons listed still show.
Content aside
- Status Answered
- 1 yr agoLast active
- 9Replies
- 172Views
-
4
Following