Support new security model in the formSubmit function - bug fix