How to make custom dashboard widget to display alert in front-end?

You can use The Codex to learn about Adding A Dashboard Widget at which point in the dashboard widget callback you can add your form or whatever you need.

Toward the top of your callback function you could add a test to check if a form posted

if(isset($_POST))

Then you can save your values, maybe using update_option() which will save your information to your database. If the $_POSTed value doens’t exist or is empty, you can then use delete_option() to remove it from your database.

Finally to get it on the front end you can use get_option() which will return your saved value or FALSE if the option does not exists.

That’s just one idea though off the top of my head. There may be better or faster ways to go about it but that’s how I would do it. Good Luck!