Is it okay to show a modal or full screen notification in a website after success/error delivery form

I have some forms in my website, and want to show a fullscreen modal that is black and has a transparency.

And in the middle a notification with some kinda of green colored header with a check mark when form delivery is successful and red with a X cross when form submit error.

Is this okay in UX or there are better approaches? which ones