How to dynamically size g:ui_input_field on a UI page?

MattSN
Mega Sage
Mega Sage

I have a sample code snippet using a g:ui_input_field where the field size is set staticly with "size=75". Can this be set dynamically to adjust to the width of the UI page?

<tr>
   <td colspan="2" >
	   <j:set var="jvar_mandatory" value="false"/>
             <g:ui_input_field id="short_description" name="short_description" label="Short Description" value="${jvar_name} is having issues" size="75"/> 
	   </td>
	   </tr>
1 ACCEPTED SOLUTION

David Arbour
Tera Guru

Size only effects how many characters a field can handle, not how wide it is. You can set the width of the element using the style attribute. Something like:

<g:ui_input_field style="width: 100%;" />

View solution in original post

1 REPLY 1

David Arbour
Tera Guru

Size only effects how many characters a field can handle, not how wide it is. You can set the width of the element using the style attribute. Something like:

<g:ui_input_field style="width: 100%;" />