Added error check to post submit; submit button is disabled until the user has written something; created popup_error function