How to increase the height of a 100 character limit text box on a form

SC10
Kilo Guru

Good day! I was wondering if you knew of an easy solution to increase the height of a string field on a normal form? I'm trying to create a max 100 character string field in a split column, but the field is displaying as your typical two-column string field would (very short), and I need it to be larger to better represent the amount of text (100 chars) that can be entered into it.

Thank you

12 REPLIES 12

ark6
Mega Guru

You could Right Click on the field and select Configure styles



And in the style field you could enter the style you want. Dont forget to mention !important for your style to take effect.



find_real_file.png



My Field


find_real_file.png


This only half works, as once the field becomes taller with height 64px (double the standard of 32), the text now gets entered into the middle of the field and doesn't word wrap:



hfvOoK.jpg


I got it. It is not coming to the next line because you cannot wrap the contents of a input type field. Instead you need to use a text-area.



However, SNOW dont have a textarea type field, you could use the workaround below to fulfill your requirement




https://www.servicenowguru.com/scripting/client-scripts-scripting/automatically-adjust-height-text-a...


I tested by putting my field to a 255 character limit, meaning it would become multi-line and display as such. This worked of course, but my client really wants a 100 character limit. I thought I'd try your link/script, but first I put the field back down to the 100 limit and refreshed my Defect form. For whatever reason, the field is still displaying as multi-line BUT with the 100 character limit - exactly what I want! Thinking this might be a bug of some sort, relating to a cache on my client, I did a cache.do refresh and a browser cache refresh, and it's still displaying as multi-line.



Have you ever encountered something like this?



s6LgRF.jpg