Remove White Space Between Form Variables

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-21-2019 07:37 AM
ServiceNow Version: London
I need to remove the white space visible between the items on a new form I am creating. I simply created the variables and they seem to have spaced themselves out without reason. See below screenshot.
Thanks in advance for your help.
- Labels:
-
User Interface (UI)

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-21-2019 11:20 AM
Thanks for starting a new comment thread. Ha.
This actually did much better, though there is still a floating div container that I cannot figure out why it is being generated. This is definitely a viable solution for now. Thank you for all your help, djohnson! Let me know if you have other ideas to try.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-11-2022 12:16 PM
In your client script or UI Policy use g_from.setDisplay('variable', bool); This will adjust the whitespace between the next variable order. If using g_form.setVisible('variable',bool); This doesn't adjust the whitespace.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-21-2023 05:24 AM
This response needs an upvote.
I've used g_form.setVisible many times without issues.
Suddenly I had a huge blank space on the variables list of the Requested Items for a specific Catalog Item.
I had no idea how to remove the blank space, but after seeing this I changed the setVisible to setDisplay and it worked wonders.
g_form.setDisplay('variable_name', true/false);