- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-25-2024 10:33 PM
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
<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>
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-25-2024 10:52 PM
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:
Mark this as Helpful / Accept the Solution if this helps
Mark this as Helpful / Accept the Solution if this helps.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-26-2024 11:29 AM
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>
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-26-2024 07:10 PM
Hi @Keang ,
Please have a look at the below:
Mark this as Helpful / Accept the Solution if this helps.