- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-16-2023 04:01 AM
Hi everyone, Im trying to add a functionality on the "save" button of the OTB "Form" Widget, in this case is that when we click the button, it should save the form and redirect the user to the home page, the problem is that I cant find the "save" button action on the Client Controller, can anyone help with this ?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-16-2023 04:20 AM
Hello @F_bio Santos ,
You can find the ng-click 'triggerUIAction' function for save in the HTML at line 118 :
<button ng-if="getPrimaryAction()" type="submit" ng-click="triggerUIAction(getPrimaryAction())" ng-disabled="submitting" class="btn btn-primary action-btn pull-right" gsft_id="{{::getPrimaryAction().sys_id ? getPrimaryAction().sys_id : ''}}">${Save} <span ng-if="saveButtonSuffix">(${{{saveButtonSuffix}}})</span></button>
You can search 'triggerUIAction' in client controller you can find the function:-
If this response clears up your doubt, kindly flag it as both helpful and correct.
Thanks,
Alka
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-16-2023 04:20 AM
Hello @F_bio Santos ,
You can find the ng-click 'triggerUIAction' function for save in the HTML at line 118 :
<button ng-if="getPrimaryAction()" type="submit" ng-click="triggerUIAction(getPrimaryAction())" ng-disabled="submitting" class="btn btn-primary action-btn pull-right" gsft_id="{{::getPrimaryAction().sys_id ? getPrimaryAction().sys_id : ''}}">${Save} <span ng-if="saveButtonSuffix">(${{{saveButtonSuffix}}})</span></button>
You can search 'triggerUIAction' in client controller you can find the function:-
If this response clears up your doubt, kindly flag it as both helpful and correct.
Thanks,
Alka
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-16-2023 04:36 AM
Hi @Alka_Chaudhary so should I put this code on the line 110 ?
window.location.href = "link_to_the_homepage";
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-16-2023 04:44 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-16-2023 04:54 AM
Hey @F_bio Santos ,
Use this code ?id=id of the page to redirect to another page.
window.location.href = "?id=link_to_the_homepage";
Thanks,
Alka