1

我有一个网站,它有很多投资组合页面。并且每个页面都有“联系我们”表格。但是我为每个投资组合使用了一个 Web 表单模块,所以我很难找到from which page customer has submitted the form

我见过很少有网站使用 提交表单specific page URL on the Email,然后网站所有者可以识别页面。

我怎么能做这样的事情?

我正在考虑在网络表单中添加选择选项。但是由于我们有很多页面,因此网站访问者很难。

<select>
  <option value="volvo">Volvo</option>
  <option value="saab">Saab</option>
  <option value="mercedes">Mercedes</option>
  <option value="audi">Audi</option>
</select> 

仅供参考:CMS 是商业催化剂。

让我知道你的建议。

这是我当前的网络表单模块。我可以在 BC 自由编辑删除修改 Web 表单。

<form action="http://www.xxxxxxxxxxx.com.au/FormProcessv2.aspx?WebFormID=42328&amp;OID={module_oid}&amp;OTYPE={module_otype}&amp;EID={module_eid}&amp;CID={module_cid}" enctype="multipart/form-data" onsubmit="return checkWholeForm83244(this)" method="post" name="catwebformform83244">
    <p>Your Name (required)<br />
    <span class=""><input type="text" aria-required="true" class="" size="40" name="FullName" /></span> </p>
    <p>Your Email (required)<br />
    <input type="email" aria-required="true" class="" size="40" name="EmailAddress" /></p>
    <p>Your Phone Number<br />
    <span class=""><input type="tel" class="" size="40" name="WorkPhone" /></span></p>
    <p>On Which Date?<br />
    <span class=""><input type="text" size="40" onfocus="displayDatePicker('CAT_Custom_26272');return false;" style="background-color: #f0f0f0;" readonly="readonly" class="" id="CAT_Custom_26272" name="CAT_Custom_26272" /> </span></p>
    <p>Your Message<br />
    <textarea class="" rows="10" cols="40" name="CAT_Custom_26273"></textarea> </p>
    <p><input type="submit" id="catwebformbutton" class="button" value="Send" /></p>

    <script type="text/javascript" src="http://xxxxxxx.australianwebsitedevelopment.com.au/CatalystScripts/ValidationFunctions.js"></script>
    <script type="text/javascript" src="http://xxxxxxx.australianwebsitedevelopment.com.au/CatalystScripts/Java_DatePicker.js"></script>
    <script type="text/javascript">
//<![CDATA[
var submitcount83244 = 0;function checkWholeForm83244(theForm){var why = "";if (theForm.FirstName) why += isEmpty(theForm.FirstName.value, "First Name"); if (theForm.LastName) why += isEmpty(theForm.LastName.value, "Last Name"); if (theForm.EmailAddress) why += checkEmail(theForm.EmailAddress.value); if (theForm.WorkPhone) why += isEmpty(theForm.WorkPhone.value, "Work Phone Number"); if (theForm.CAT_Custom_26272) if (theForm.CAT_Custom_26272.value.length > 0) why += checkDate(theForm.CAT_Custom_26272.value,"On Which Date?");if(why != ""){alert(why);return false;}if(submitcount83244 == 0){submitcount83244++;theForm.submit();return false;}else{alert("Form submission is in progress.");return false;}}
//]]>
</script>
</form>
4

1 回答 1

2

假设您使用的是 jQuery,您可以执行以下操作:

HTML:

<input type="hidden" id="sourcePage" name="sourcePage" />

jQuery :

$(document).ready(function(){ // if you didn't set it before
  var docHref = document.URL;     
  $('#sourcePage').attr('value', docHref);  
});

这会将当前 URL 添加到输入的值中,因此您将能够将此数据发送到您的表单。

于 2014-05-05T08:49:03.923 回答