【问题标题】:How to make a form send email & post form fields to an external URL如何使表单向外部 URL 发送电子邮件和发布表单字段
【发布时间】:2021-08-02 11:48:16
【问题描述】:

我在我的网站上使用 Salesforce 网络潜在客户表单。当我提交表单时,它会重定向到 Salesforce 链接并创建新的潜在客户。

我希望表单首先向我发送一封电子邮件通知关于表单详细信息,然后打开销售人员以添加潜在客户。

我怎样才能让表单做到这一点?

<form action="https://webto.salesforce.com/servlet/servlet.WebToCase?encoding=UTF-8" method="POST">
<input  type=hidden name="orgid" value="00D5g000000IUJD">
<input type=hidden name="retURL" value="https://mytimios.com/thank-you">
<input class="formelem" style="width:100%;" id="name" maxlength="80" name="name" size="30"  type="text" placeholder="Name" required="true" /><br>
<input class="formelem" style="width:100%;" id="email" maxlength="80" name="email" size="20" type="text" placeholder="Email" required="true" /><br>
<input class="formelem" style="width:100%;"  id="phone" maxlength="40" name="phone" size="20" type="text" placeholder="Phone Number" required="true" /><br>
<select style="width:100%;" id="00N5g000003uiad" name="00N5g000003uiad" title="Category" required="true"><option value="">--Select Issue Type--</option><option value="Tracking Order">Tracking Order</option>
<option value="Delivery Issue">Delivery Issue</option>
<option value="Quality Issue">Quality Issue</option>
</select><br>
<input class="formelem" style="width:100%;" id="subject" maxlength="80" name="subject" size="20" type="text" placeholder="Subject" required="true" /><br>
<textarea name="description" placeholder="Description" ></textarea><br>
<input class="formelem" style="width:100%;" id="00N5g000003uiae" maxlength="20" name="00N5g000003uiae" size="20" type="text" placeholder="Order Reference Number" required="true" /><br>
<select style="width:100%;" id="00N5g000003uiaf" name="00N5g000003uiaf" title="Sub Category" required="true"><option value="">--Select Issue Sub Type--</option><option value="Delay in the Delivery">Delay in the Delivery</option>
<option value="Damage Product">Damage Product</option>
<option value="Incomplete Delivery">Incomplete Delivery</option>
<option value="Misplaced  package">Misplaced  package</option>
</select><br>
<input id="subbtn" type="submit" name="submit" >
</form>

【问题讨论】:

    标签: javascript php html forms salesforce


    【解决方案1】:

    你将不得不:

    a) 将提交过程分成 2 个 ajax 请求(第一个发送给您自己的后端或电子邮件服务),第二个发送给 salesforce。

    或 b) 将表单数据发送到您自己的后端,在那里您将处理并向自己发送一封电子邮件,然后通过他们的 api 向 salesforce 发送新的潜在客户。

    【讨论】:

      猜你喜欢
      • 2018-12-04
      • 2017-08-07
      • 2021-04-25
      • 2013-03-01
      • 2012-02-16
      • 1970-01-01
      • 2022-11-30
      • 1970-01-01
      相关资源
      最近更新 更多