Messages
We can add messages to the form, a message is displayed in a box with a specific color. We can define the color of the message in the color property. It accepts primary, secondary, success, danger, warning, info, dark, light. The text that will be displayed in the message box, is defined in the message property. It accepts either a string or an object defined where the message comes from.
{
"message": {
"type": "message",
"message": "This is a message",
"color": "info"
}
}
This is a simple message, the string "This is a message" will be shown in a blue box.
{
"message_form_data": {
"type": "message",
"message": {
"from": "message_coming_from_external_data"
},
"color": "info"
}
}
In this example the message that will be shown in the blue box will be coming from the data under the key message_coming_from_external_data.
Formats
Like the texts, messages can be formatted by setting the format with the format property. price or date are the only formats available for messages.
{
"formatted_message": {
"type": "message",
"color": "info",
"message": "123456",
"format": "price"
}
}