- Post History
- Subscribe to RSS Feed
- Mark as New
- Mark as Read
- Bookmark
- Subscribe
- Printer Friendly Page
- Report Inappropriate Content
on ‎03-02-2017 06:36 AM
Greetings all. I came across a simple way to colorize those dull, dreary UI Actions that can sometimes be hard to see in the form header. For this example, I'm using a Chrome browser with a submitted change request that is in a state of New.
- Load an existing change request that is in the New state and open the browser's element inspector (CTRL-SHIFT-C).
- Hover over the "Request Approval" button in the header and click, then copy the element 's ID to the clipboard.
- Create a UI Formatter and a UI Macro and name them something relevant. Reference the wiki for details.
- Open the change request form in the designer and place the formatter anywhere on the page as it will have no elements or space. I placed mine on the last row of the second column.
- Creating the style in the UI Macro serves as an override for the button element as it loaded after the UI Action. Make sure the name of the element referenced in the style tag is the same as the one we copied to the clipboard in Step 2.
UPDATE: Here's an update that simplifies this even more. I've learned that the element id's referenced in the style tags are actually a property of the UI Action, called the "Action name". If this field is left blank, then you will get a sys_id and you will not be able to reference it from the code. I went in and gave an existing UI Action on the Change form a name and now I don't even need to inspect elements, as I did in the previous post, I can just insert the Action name into the style tag.
Here's my new UI Macro/Formatter code:
Enjoy!
This document was generated from the following discussion: Styling UI Action Buttons
- 8,847 Views

- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
Hey Chris. Good stuff. Have you tried this with a scoped app?
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
Hey Chuck. The answer is yes, it works fine in a scoped app.
Enjoy!

- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
Thanks Chris. I'll have to keep tinkering. I must have something wrong somewhere in my scoped app UI macro or formatter. Hopefully it's something simple I've overlooked after hours and hours of developing other stuff.
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
Try removing the colons between the name and the params.

- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
Thanks Chris! I knew it was something simple. I've been doing too many script includes that I forgot my CSS syntax! Removing the colons worked perfectly.

- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
This is great stuff!
One challenge I see is the button at the bottom of the form. For some reason the font-color attribute isn't working. See image: Any ideas?
Top of Form: White font
Bottom of form: black font:
My macro:

- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
Never mind - I saw my mistake in the css.
font: white should be color: white
doh!
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
UPDATE: I'm using the same technique for my update set picker by changing the width property. I also switched from using the foreground/background colors to simply adding a slight border, which makes it appear more like a 3D button. So use the same style section, just find the id's of the different elements you want to change. This techniques migrated from Geneva to Jakarta with no hiccups.
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
Hello Chris,
Do you have an updated example / consolidated instructions for how to do the background highlight border?
Does this still work in Orlando/Paris?
Does it work in conjunction with the form style field?

- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
Brilliant. Thank you for explaining that this can be done via UI Macro's using XML/Jelly. Soooooo much better than manipulating the DOM with an onLoad client script 🙂
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
Very inspiring article! You can in fact do much more styling in the backend form, even to the extent of applying external CSS. I wrote a post about it here.