pass data to beforeFormSubmit as reference