Custom JavaScript for use on the AutoResponder thank you of Edit Pages and Forms used within Workflow Lightboxes
The code below should be included on an autoresponder thank you page of an edit page or form shown within a lightbox window, typically opened from a rowAction Widget. The code below should be placed inside <script> tags within the head of the Autoresponder thank you page.
Refresh the opening workflow page when the form is submitted.
Note, that this code would only ever be required when opening a form directly via the External URL option. If you use the Form or EditPage options of the RowAction Widget, their are option in the UI to auto-close the window and refresh the parent page. This code can be useful when you are linking to a form via the External URL option.
window.parent.parent.location.reload()
Remove the buttons in the button bar of the lightbox window.
Useful when displaying a generated PDF (for example) and you want the "processing" button to be removed.
window.parent.parent.workFlow.workflowModal.toogleButtonState('hide','direct');
Attach a listener to refresh the underlying workflow page when the lightbox/modal is closed.
This code would only be used in certain edge cases, when the default UI option for reloading the parent page are not applicable.
window.parent.parent.workFlow.workflowModal.dialog.options.onhide = function(){window.parent.parent.location.reload()};
0 Comments