Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

Set the size of a g:ui_multiline_input_field

Ethan Davies
Mega Sage
Mega Sage

Hi, 

I am having some trouble at the moment getting a g:ui_multiline_input_field that is located in a UI page to render the input field at a particular height/width and was wondering anyone has any pointers on how to resolve the issue. 

UI Page Current Code:

<g:ui_form>
  <!-- Get values from dialog preferences passed in -->
  <g:evaluate var="jvar_short_text"
    expression="RP.getWindowProperties().get('short_text')" />
  <g:evaluate var="jvar_comments_text"
    expression="RP.getWindowProperties().get('comments_text')" />
   <!-- Set up form fields and labels -->
   <table width="100%">
     <tr>
       <td>
         <!-- Comments text field (Contains comments from originating record as a default) -->
         <g:ui_multiline_input_field name="dial_comments" id="dial_comments" label="Notes" value="" mandatory="true"/>
       </td>
     </tr>
     <tr>
       <td colspan="2">
       </td>
     </tr>
     <tr id="dialog_buttons">
        <td colspan="2" align="right">
           <!-- Pull in 'dialog_buttons_ok_cancel' UI Macro for submit/cancel buttons.
          'ok' option will call the 'validateComments' Client script function from the UI Page-->
           <g:dialog_buttons_ok_cancel ok="return validateComments()" ok_type="button" cancel_type="button" />
        </td>
     </tr>
  </table>
</g:ui_form>

The above code renders the UI Macro as below. You can see that the multi line input field is created with an undesirable width. I have tried setting width and height values in the code block for where the g:ui_multiline_input_field is created but this didn't appear to do anything. 

find_real_file.png

Any help on this appreciated.

Thanks!

5 REPLIES 5

Awesome.

Thanks Ethan!