From Bland to Grand: Decorating ServiceNow Forms Like a Pro

Deepak Negi
Mega Sage
Mega Sage

Ah, Servicenow! The go-to platform for all your enterprise needs. If you’re familiar with this powerhouse of a tool, then you know that it’s capable of doing some pretty impressive things. But did you know that it can also help you create a killer form background? That’s right, folks, ServiceNow has got your back.

Not only form background, you can style multiple elements in a single configuration. Excited to know how you can do the below in a ServiceNow form?

 

BG.gif

 

Well, follow these steps to do a similar setup.

  1. First things first, let’s talk about backgrounds. Adding a background to your form can make a world of difference. But why stop at just a simple image? Get creative with it! Add a pattern, gradient, or even a subtle animation to really make your form pop. You can download the below image for instance.
DeepakNegi_1-1682415662641.gif

 

2. Upload under System UI > Images

DeepakNegi_2-1682415645976.png

 

3. Create a UI Macro and add the following code. Notice the CSS has other elements too which need to be styled to make the background look more appealing.

<?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>
.touch_scroll{
background:url("/formbg.png");
background-size:cover;
background-position:center;
}
label{
font-weight:600;
font-size:16px;

}
.btn-default{
background:#fff;
} under
table,form,.section,.tabs2_section {
background:transparent !important;
}
</style>
</j:jelly>

4. Create a new UI Formatter for incident table under System UI > Formatters. In the formatter field, add the <macro_name>.xml

DeepakNegi_3-1682415645062.png

 

5. Go to form layout and place the formatter on the form and that's it!

DeepakNegi_4-1682415645720.png

 

Output:

DeepakNegi_5-1682415646229.png

 

It was fun working on it. This may not be an actual requirement in most cases, but it was a good learning on knowing that SN is so flexible. You can do other styling on the form inside the macro e.g., change color of a specific label, input styles, hover/focus effects etc.

 

Please note this may or may not work as is on next Exp and workspaces

Let me know your thoughts here.

 

Follow my blog: Deepak Negi – Medium

Follow me on LinkedIn: Deepak Negi | LinkedIn

 

Happy Learning!

1 REPLY 1

Nisha15
Mega Sage
Mega Sage

I tried this by myself , it looks so cool and it is trending everywhere. The great thing is we don't need to do lots of customizations. Thank you for sharing these cool and interesting idea with us.