At times, the same modal dialog page is used to add as well as to edit a record. In such circumstances, a user-friendly title enhances the UX. Updating non-modal dialog page title For a non-modal dialog, this is pretty straightforward. A substitution string can be used to dynamically set the title. For example, the page title in this scenario is set to Vendor display name. This is achieved by updating the title attribute. However, this approach will not work for modal dialogs. We can use javascript to update the modal dialog title. Updating Modal Dialog Title On page load, use a dynamic action to set the dialog title. .m-dialog-content CSS class is optional. This is used to avoid updating the title of the parent dialog in scenarios where a modal page opens another modal page. Output Edit Add
Comments
Post a Comment