How to Display Multiple Checkboxes Horizontally on a Record Producer Form?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
4 hours ago
Hi everyone,
I’m working on a Record Producer form and would like to display three checkboxes horizontally (side-by-side) instead of vertically stacked.
Is there any recommended way to achieve this in ServiceNow?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
4 hours ago
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
4 hours ago
Refer the KB article to create the variables horizontally using container
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 hours ago
Hi @E555,
You can refer to this: Solved: Arrange variables in a container in Service catalo... - ServiceNow Community
However, that approach allows you to arrange only two checkboxes horizontally.
If you need to display more than two checkboxes side-by-side, another option is to use a UI Page variable type and place your HTML inside the UI Page.
But keep in mind that if you use a UI Page, you will also need to write all the client-side scripts to handle the checkbox logic.
This adds extra complexity, so it’s usually not the preferred method.
<?xml version="1.0" encoding="utf-8" ?>
<j:jelly trim="false" xmlns:j="jelly:core" xmlns:g="glide" xmlns:j2="null" xmlns:g2="null">
<!-- Wrapper div for checkboxes -->
<div class="checkbox-container">
<label>
<input type="checkbox" id="checkbox1"/> Option 1
</label>
<label>
<input type="checkbox" id="checkbox2"/> Option 2
</label>
<label>
<input type="checkbox" id="checkbox3"/> Option 3
</label>
</div>
</j:jelly>
Results:
Thanks & Regards,
Siddhesh Jadhav
If my solution helped to resolve your query, please mark it as Accepted and Helpful.
