Change the size of a single line text box
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-27-2014 05:11 PM
Is there a way to set the width of a single line text variable in a catalog item? I have a reference variable whose icon is falling to the next row so i am hoping that by changing the width of the other fields on that row it will get everything on one line. Hope that makes sense.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-27-2014 05:15 PM
Hi David,
For your text field, you can use an onLoad client script to set the width in pixels. Adjust the number as needed.
g_form.getControl('variable_name_of_text_field').style.width = '200px'; //Set the width of a field
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-27-2014 05:54 PM
That worked great but now the label or "question" is still too big. I will keep looking for a way to set that attribute. Thanks again.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-27-2014 06:12 PM
check out Mark Stanger (Crossfuze) SNCGURU article: » How to set up Field Styles for Service Catalog Variables in Service-now.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-27-2014 08:53 PM
Thanks this link has opened up a whole new world of options!!
It does look like my problem has to do with the fact my single line text is in a two column container and is inheriting the size from the container. This has all been very helpful, thanks.
*** it's a little wonky but i fixed this issue by setting the size of one of my multi-line text boxes and so it was inherited.