Before posting the form

Hello there,
I designed a form using FormGroup. I have a Submit button. But before I click submit, I want to open the message box. Then I want to submit the form. How can I do that ?