width & height of HTML variable in service catalog

Vdix
Tera Guru

Hi,

Could somebody suggest me on catalog item we have a field where variable type is HTML, now I Would like to change width & height of that HTML field  as well as font.

Thanks

4 REPLIES 4

Hussain Kachwal
Mega Guru

Hello,

You may edit the variable as highlighted in the snap below:

find_real_file.png

 

Kindly mark as Answered or Helpful, if applicable.

-Hussain K

Kailash Bhange
Mega Sage

Hi,

If anyone still looking to get it done, please write onLoad Client script for Catalog item with below Code.

 

var form = typeof g_sc_form != "undefined" ? g_sc_form : g_form;
var myControl = form.getControl("VARIABLE_NAME");
myControl.style.height = '100px';

 

Hope this helps.

If my answer resolves your issue, please mark my answer as āœ… Correct & ????Helpful based on the validations.

Thank You!
Regards,
Kailash

 

Ishaan Shoor
Mega Sage

Hi Vibha, 

DOM Manipulation is not considered as a best practice for ServiceNow.

Regards,
Ishaan

Kailash Bhange
Mega Sage

Hi Vibha,

If the issue has been resolved, please mark the thred as complete with appropriate correct answer.

 

Thanks,

Kailash