To resize the dialogue box to come down under breadcrumbs
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-09-2025 06:59 AM
I have a deletegate form which gets open when we click on New button shown in Snap 1 , I want this dialogue box to come under the breadcrumb Home > Delegate. Please advice how to make this change:
.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-09-2025 07:26 AM
Hi @Mishu,
Is there a particular reason why centering the Modal doesn't work? Are you trying to provide visibility to fields on screen for example? There's a reason why it's centered from a UX perspective to cater for different screen/browser sizes etc.
Sadly the Developer API notes don't cover any parameters for this, however, if the GlideModal is displayed on a portal as shown in your screen shot, CSS is always an option as show by an example below:
/* Adjusting position of the GlideModal */
.glide_modal {
position: absolute !important;
top: 50px !important; /* Set your desired top position */
left: 100px !important; /* Set your desired left position */
right: auto !important;
bottom: auto !important;
}
GlideDialog API: (https://www.servicenow.com/docs/bundle/xanadu-api-reference/page/app-store/dev_portal/API_reference/...
An alternative option I've seen online but please note this is not tested by me is to try the below via javascript. However, again I'd prefer to understand why centering doesn't work initially as various screen sizes are often a forgotten perspective.
var modal = new GlideModal('modal_dialog');
modal.setTitle('Custom Modal Title');
modal.render();
// Wait for the modal to be rendered, then adjust its position
modal.on('render', function() {
var modalElement = document.querySelector('.glide_modal');
if (modalElement) {
modalElement.style.position = 'absolute';
modalElement.style.top = '100px'; // Change top position
modalElement.style.left = '50px'; // Change left position
}
});
To help others (and for me to gain recognition for my efforts), please mark this response correct by clicking on Accept as Solution and/or Kudos.
Thanks, Robbie
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-09-2025 07:29 AM
how are you rendering it?
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-09-2025 07:37 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-09-2025 07:59 AM
check this link and enhance your code to align to left
How to center a popup modal in servicenow portal?
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader