My requirement is i want a free form field - display 1 line but can be multi-line

Prioja Sahu1
Tera Contributor

Hi All ,

 

My requirement is i want a free form field in service catalog, where they want the field to be displayed as a single line text in the form view, but it can be multiline text as in the height of the field box will keep on increasing depending on the data input.  

 

So this is what i have tried, i have made that field as a multiline field and have created a onload client script and added this code,

 

g_form.getControl('reply_to_sender').style.height = '20px';

 

but still the box height is same as of a multiline text type, but i want the height of a single line type variable initially which will keep on increasing with adding text as of a multiline field.  Let me know how to acheive this.

 

PriojaSahu1_0-1691655652956.png

 

1 REPLY 1

_navin9898
Tera Expert

Hi @Prioja Sahu1 

 

please go through below link and let me know if it helps:

Automatically adjust the height of text area to fit contents - ServiceNow Guru

 

Best Regards,

Naveen