The function checkForm() is triggered when the submit button is clicked. The function shows a message to the user.