Basic submit function template