Adds auto-setting of submit type