Form Style field on the UI Action form

Tiago Castanhe2
Kilo Contributor

I was trying to change the color of an UI Action with the good old method of forcing style with a client script when I noticed a new(?) field called the Form Style.

find_real_file.png

This does exactly that, changing the color of the button to one of those (primary=blue, destructive=red). I looked through the SNOW Docs and did a quick google search and couldn't find any information regarding this feature.

find_real_file.png

Looking at the options, their values are just the name itself (I was expecting at least some css definition). Anyone has any insights regarding this feature?

16 REPLIES 16

sndangibbard
Mega Guru

I think they are inspired in that but not all of them are available. I've tried a couple of them like "danger" but they don't seem to work


There are several examples available in the UI action list that use the new styles. I invite you to take a look and compare.


Chuck Tomasi
Tera Patron

Hi Tiago,

The feature came out in Jakarta. You can style the buttons on forms and lists those to ways (primary and destructive.) If you want to style with other colors, you can do that by using a UI macro that contains only the CSS, and references the class name as the UI action "Action name" field. The UI macro would look like this (given the UI action names event_going and event_not_going

 

<?xml version="1.0" encoding="utf-8" ?>
<j:jelly trim="false" xmlns:j="jelly:core" xmlns:g="glide" xmlns:j2="null" xmlns:g2="null">
  <style>
    #event_going {background-color: LimeGreen; color: #fff; }
    #event_not_going { background-color: Tomato; color: #fff; }
  </style>
</j:jelly>

Use a formatter to place it on the form. You can see me do this in CC17-2 of TechNow

 

TechNow Episode List