Change the size of a single line text box

trevino-d
Kilo Contributor

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.

5 REPLIES 5

JordanLind
Kilo Guru

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


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.


trevino-d
Kilo Contributor

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.