added submit button and check required field empty function