[SOLVED] Modal message attributes

Hi,

I’ve used the msgprint("some warning...") command in the custom script validate event I’ve created.
The form validates and gives the message correctly. But the bullet of the popup window is always blue. How can I turn it red? Because it’s validation message and needs to be red.

Thank you

1 Like

Hi @emakis,

Please check below code.

var indicator = “red”
var title = “It is red!”
var message = “Warning, you are about to /etc/init.d daemon stop!”
frappe.msgprint({“message” : message, “title” : title, “indicator” : indicator});

I have found all json options here:
https://github.com/frappe/frappe/blob/develop/frappe/public/js/frappe/ui/messages.js#L77

Hope it helps for further customization :slight_smile:

4 Likes

Great! Thank you!

1 Like

Please mark this topic as [SOLVED].