Find your people. Pick a challenge. Ship something real. The CreatorCon Hackathon is coming to the Community Pavilion for one epic night. Every skill level, every role welcome. Join us on May 5th and learn more here.

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

MattSN
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%;" />