Actually this is not the real condition here. It's better to define a method on the AutoForm object, and then call this method when the form is submited or reseted.