We have a modal window that should always have content when opened via a mouse click on a web page, however, it's possible that since it's delivered dynamically from a database, it may not be available.

What text should I display in this use case? I can default to something in the code and I was told to use something like: "There is no content to display", but that doesn't direct the user in any way.

Their only option is to click the "X" on the modal, go back to the page and try later. I can't anticipate if all of the database tables might be down or an intermittent network issue might cause this to happen, so what would be best to communicate to the user in this use case?



If you have no content, you shouldn't display a modal at all, simply create a conditional like

`if $content=true -> $modal=true; 
else $modal=false`

otherwise you'll be creating unnecessary friction. Remember that modals are intrusive, so they must be used sparingly. If you don't have nothing to show, then you don't need a modal.


If for some reason you NEED to show a modal no matter what (and if so... are you sure?), then I'd recommend you to check the following resources:

  • 2
    +1 some good references provided to help implement different empty states – Michael Lai May 18 '16 at 22:57
  • Interestingly we are using material design with Angularjs in our code, but in my case I have to display a modal. Excellent answer! – user9533 May 19 '16 at 15:32

There are many existing guidelines on displaying information messages to the user (whether it is by modal window, toast notification or some other method), but the general principle is that it should help solve a user's problem or help them achieve their goal.

So you should ask the question: "What is the user expecting to be able to do when they click this button/link?"

In the case where the modal window provides a solution, the content presented should provide the information required to solve a problem or achieve a goal. Therefore, in the opposite scenario where this doesn't happen, you have a couple of choices in dealing with the user expectation depending on the way the system is implemented and what information you can get from the failed system transaction:

  • We'll be open in 10min: if it is a matter of something not being available now, perhaps letting them know when it will be available so they can come back at another time.
  • Try the other store: if there is another way that they can get the information, maybe point them to it so they can try their luck there.
  • I'll have to ask the manager: if you really don't know what's going on and can't find out (but someone else can), perhaps point them to someone who can.
  • Honesty is the best policy: in the event that you really don't know what's going on, perhaps just letting the user know (not sure what the consensus is on providing an apology as well) and that you'll try to sort out the issue ASAP.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy