简体   繁体   中英

Webform submit with specific page url

I have a website, it has many portfolio pages. And each page has "Contact Us" form. But I have used one web form module for every portfolio, so I was having problem to find out from which page customer has submitted the form .

I have seen few websites doing submit the form with specific page URL on the Email , then website owner can identify the page.

How can I do something like this?

I was thinking to add select option in web form. But since we are having many pages, it makes hard to website visitors.

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

FYI : CMS is Business Catalyst.

Just Let me know your suggests.

Here my Current web form module. im free to edit delete modify web form in BC.

<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>

Assuming you're using jQuery, you can do something like that :

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);  
});

This will add the current URL to the value of an input, so you'll be able to send this data to your form.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM