move submit event listener into named function. this also fixes a bug where params var was getting overridden with each form in all selected forms