WordPress.org

Ready to get started?Download WordPress

Forums

Contact Form 7
Integrating Contact Form 7 with Salesforce (2 posts)

  1. mattyk1972
    Member
    Posted 1 year ago #

    Hi there.

    I'm working with a client who is looking to integrate their current forms with Salesforce CRM, so that every enquiry form that is filled out on their website goes straight into Salesforce as a potential lead. So far things have been going well, thanks to the great information I found at this site

    http://www.alexhager.at/how-to-integrate-salesforce-in-contact-form-7/

    The only thing that I don't seem to be able to get the form to do is to pass on the url of the page the contact form was completed on. I've tried the special mail tags to see if they work, but to no avail.

    For the standard field entries, I have this code:

    $first_name = $cf7->posted_data["first-name"];

    And I'm trying to find out what the code would be to capture the page URL and send it to Salesforce. At the moment I have this, but it's not working:

    $pageURL = $cf7->posted_data["_post_url"];

    Any help from any CF& or Salesforce experts would be very useful.

    Thanks

    http://wordpress.org/extend/plugins/contact-form-7/

  2. dedong
    Member
    Posted 1 year ago #

    Why don't you use jquery and some simple php code;
    make a hidden field in your contact form ie: ["url_post"]

    $(function(){
    		$('input[name="url_post"]').val('<?php echo $_SERVER['HTTP_HOST']; ?>');
    	});

    Then send the information captured by the ["url_post"] to salesforce using alexhager tutorial...

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic