pass action and method to onSubmit