How to change the label name in ui page?

Keang
Tera Contributor

Hello,

We have a UI page featuring Cancel and OK buttons. Could someone please assist in updating the OK button label to 'Yes' and the Cancel button label to 'No' to ensure clarity for our users?  Thank you

 

Keang_0-1719379782396.png

 

 

 

<g:ui_form onsubmit="return invokePromptCallBack('ok');">
    <table width="100%">
        <tr>
            <g:evaluate>
                var title = "${RP.getWindowProperties().get('title')}";
                title = gs.getMessage(title);
            </g:evaluate>
            <!--<td nowrap="true"><label for="glide_prompt_answer">${title}</label></td>-->
            <td nowrap="true">
                <!--<input id="glide_prompt_answer" name="glide_prompt_answer" value="${RP.getWindowProperties().get('text')}"/>-->
              <g:ui_reference name="approvers" table="sys_user" query="active=true" field="name" preview_icon="false"/> 
            </td>
        </tr>
        <tr>
            <td colspan="3" align="right">
                <br/>
                <g:dialog_buttons_ok_cancel 
                   ok="invokePromptCallBack('ok');" 
                   ok_type="button" 
                   cancel="invokePromptCallBack('cancel')" 
                   cancel_type="button" />
            </td>
        </tr>
    </table>
</g:ui_form>

 

1 ACCEPTED SOLUTION

SN_Learn
Kilo Patron
Kilo Patron

Hi @Keang ,

 

You can try below:

 

<g:ui_form onsubmit="return invokePromptCallBack('ok');">
    <table width="100%">
        <tr>
            <g:evaluate>
                var title = "${RP.getWindowProperties().get('title')}";
                title = gs.getMessage(title);
            </g:evaluate>
            <!--<td nowrap="true"><label for="glide_prompt_answer">${title}</label></td>-->
            <td nowrap="true">
                <!--<input id="glide_prompt_answer" name="glide_prompt_answer" value="${RP.getWindowProperties().get('text')}"/>-->
              <g:ui_reference name="approvers" table="sys_user" query="active=true" field="name" preview_icon="false"/> 
            </td>
        </tr>
        <tr>
            <td colspan="3" align="right">
                <br/>
                <g:dialog_buttons_ok_cancel ok_text="${gs.getMessage('Yes')}" ok="return actionOK()" ok_type="button" cancel_text="${gs.getMessage('No')}" cancel_type="button" cancel="cancel()"/>
            </td>
        </tr>
    </table>
</g:ui_form>

 

Output:

 

SN_Learn_0-1719381100881.png

 

Mark this as Helpful / Accept the Solution if this helps

----------------------------------------------------------------
Mark this as Helpful / Accept the Solution if this helps.

View solution in original post

6 REPLIES 6

Keang
Tera Contributor

Thank you @SN_Learn ,

I figured it out how to call invokePromptCallBack(type) function.  This is for my learning purposed. Could you please let me know how I could hide either one of the button. Hide "cancel" button using the following code.  

 

  <td colspan="3" align="right">
                <br/>
                <g:dialog_buttons_ok_cancel
				ok_text="${gs.getMessage('Yes')}" 
                ok="invokePromptCallBack('ok');"  
                ok_type="button" 
                cancel_text="${gs.getMessage('No')}" 
                cancel_type="button" 
                cancel="invokePromptCallBack('cancel')"
				/>
            </td>

 

Hi @Keang ,

Please have a look at the below:

 

Hide button on UI page 

----------------------------------------------------------------
Mark this as Helpful / Accept the Solution if this helps.