Jun 21, 2022·1 min read

How to Show a Notification on a Web Page?

Learn how to show a message on a web page

How to Show a Notification on a Web Page?

While working with a web application, the user sometimes needs to receive feedback messages, for example, about successful saving/updating of data, completing some processes, or an error that occurred.

Block to display messages in AppMaster

The Show Notification block is responsible for displaying messages in AppMaster web applications. You can find it in the frontend BP editor, under App Action.

With this block, you can customize the title and text of the message, the type of message, choose where to place the message on the page, and the length of time for which the message will be displayed. You can manually or dynamically set a value for each of these parameters by creating your custom logic.

Practical example

Let's look at one of the most commonly used cases of working with notifications. We will display a message to the user after he tries to log in to the application. If the authorization is successful, we will display a statically defined message:

Otherwise, we will dynamically display the error that prevented the user from logging in:

This is what the final result might look like:

Conclusion

We now know how easy it is to work with web page messages in AppMaster. Learn more useful information about working on the platform in our Help Center.

FAQ

Which AppMaster block shows messages on a web page?

Use the Show Notification block in the frontend Business Process editor. You can find it under App Action and connect it to the event that should trigger the message.

What can I customize in a notification?

The block lets you set a title, message text, notification type, page position, and display time. You can enter values directly or pass values from your business process.

How do I show a success message after saving data?

Add the Show Notification block after the action that saves, updates, or completes a process. Write a short confirmation such as “Changes saved” so users know the action worked.

How can I display a login error to the user?

Connect the notification to the error path of your login or other action. Pass the error text into the message field so the user sees why the action did not finish.

When should I use static versus dynamic notification text?

Use a fixed message when the wording should stay the same, such as a successful login notice. Use a dynamic value when the text depends on the result, such as an error returned during authorization.

Where do I add the Show Notification block?

Place the Show Notification block in the frontend BP that handles the user action. A notification belongs in the web interface flow because it gives feedback directly on the page.

Can I choose where the notification appears on the page?

Set the position in the block’s parameters. Choose a location that does not cover the form, buttons, or other controls the user may need next.

How long should a notification stay visible?

Set the display duration in the Show Notification block. Keep success messages brief, but give users more time to read error messages with useful details.

What makes a notification useful?

Keep the title and text short, and tell the user what happened or what they should fix. For errors, use the actual error message when it gives clear guidance.

Can I use notifications for actions other than login?

Yes. The same block can report a completed process, an updated record, a failed request, or another result from your frontend business process.

Easy to start
Create something amazing

Experiment with AppMaster with free plan.
When you will be ready you can choose the proper subscription.

Get Started