Get the submit function out of the scope.