One form, One submission button, but TWO actions

后端 未结 5 791
佛祖请我去吃肉
佛祖请我去吃肉 2020-12-11 05:44

I have a form that collects client\'s info and then it

  • saves them in the database
  • sends out few emails
  • sends the info to SalesForce (SF) depar
5条回答
  •  忘掉有多难
    2020-12-11 06:21

    If you have control over the raf-submitted.php page what I'd suggest is that you have an onclick action for the form which (after local validation) uses jQuery.ajax to call your page providing the field values as parameters in the query string (if using GET) then simply allow the submit process to continue passing the data to SalesForce.

    If however you need to make the Salesforce activity invisible then you could call them the same way using type=POST and hand off to your form after that completes

提交回复
热议问题