Textarea Size need to increase for Change

venkateshdhanap
Tera Contributor

Hi All,

I need to add place holder text for some fields in Change form. Some place holder texts having multiple lines but Text are of the respective field is less.Hence place holder Text is not fully visible it skips some below rows. Please provide codes to increase size of the field in the Change form.

find_real_file.png

I have added above place holder text as in the screenshot but some below lines are not visible.
i need to increase size of the respective fields

Thanks in Advance

Venkatesh

1 ACCEPTED SOLUTION

Sagar Patro
Kilo Guru

Hi Venkatesh,



You may use onLoad client script for this as follows:



var x = $("change_request.description"); //any field


x.style.height ="350px"; // any pixels



If this doesnot solve what you need you may use autoResize function on jQuery. Reference: Textarea Tricks | CSS-Tricks


$('textarea').autoResize();



Please Hit ✅Correct, ��Helpful, or ��Like depending on the impact of the response


View solution in original post

7 REPLIES 7

Brad Tilton
ServiceNow Employee
ServiceNow Employee

You could do something in an onload client script, but that would likely involve some dom manipulation. My recommendation would be to try to fit everything in the 3 lines you get with the textarea, or use a fieldMessage on those fields.


Sagar Patro
Kilo Guru

Hi Venkatesh,



You may use onLoad client script for this as follows:



var x = $("change_request.description"); //any field


x.style.height ="350px"; // any pixels



If this doesnot solve what you need you may use autoResize function on jQuery. Reference: Textarea Tricks | CSS-Tricks


$('textarea').autoResize();



Please Hit ✅Correct, ��Helpful, or ��Like depending on the impact of the response


Hi Vidysagar,


Your above code


var x = $("change_request.description"); //any field


x.style.height ="350px"; // any pixels


Perfectly fixes my issue.. Its increases size of the text area as per our requirement.
Thanks very much


Venkatesh