Support new security model in the formSubmit function