Maintain error message on page

  • 1
  • Question
  • Updated 3 years ago
Is there a way to keep the error message on the screen?  When a user clicks the error/info/warning message, the message goes away.  Is there a way to keep it on the page permanently?
Photo of Matt Hoffman

Matt Hoffman

  • 172 Points 100 badge 2x thumb

Posted 3 years ago

  • 1
Photo of Irvin Waldman

Irvin Waldman, Champion

  • 9,006 Points 5k badge 2x thumb
For starters, what is the origin of the errors -- Salesforce, Skuid, custom JS?
Photo of Matt Hoffman

Matt Hoffman

  • 172 Points 100 badge 2x thumb
I'm trying to use the info message on page load when a customer hasn't entered all information meeting our data quality standards (missing zip code or something like that).  I created an inline javascript that posts messages to the screen on page load with: 

           editor.handleMessages(                [{
                    message: "Contact is missing XXXXXX,
                }]
            );    

It works just fine, but I don't want the user to be able to clear the message.  If they click on it, they need to reload the page to see the message again.
Photo of Ben Hubbard

Ben Hubbard, Employee

  • 12,490 Points 10k badge 2x thumb
I think we'd have to add an option to the api like 

clearable : false

or something like that. Otherwise, you're stuck with hacking the DOM.
Photo of Matt Hoffman

Matt Hoffman

  • 172 Points 100 badge 2x thumb
That's what I was afraid of.  Thanks though.