Messages showing on Page Title from Popup

  • 1
  • Problem
  • Updated 3 years ago
Hi All,
I did some research into this topic on here but still haven't been able to solve this problem. We would conditionally show an error warning message on the page if there are fields missing from a snippet we run when we click send and it validates. This worked pre-Bonzai and we were able to generate warnings and stop and hide the popup so the user could go back and fix, or conditionally show a success message. I have been trying to address this and it seems to display messages conditionally on the pop up perfectly fine. Its only when we try to show these messages on the page (not the pop up) that we do not see them. The code Im using from the popup to show the messages on the page is here, this code is the same across the board so I just used one of the snippets. I verified that all of the names are correct and everything else.

 var pageTitle = $('#pageTitleBB');                           
 var editor = pageTitle.data('object').editor;
                
             if (window.result[0] !== ''){
                     console.log(window.result[0]); 
                      editor.handleMessages([
                      {
                            message: window.result[0],
                            severity: 'WARNING'
                       }
                        ]); 
             }
Photo of John Pernock

John Pernock

  • 140 Points 100 badge 2x thumb

Posted 3 years ago

  • 1

Be the first to post a reply!