converted click event to submit event to support non-click submissions