Contact Form 7
Form action - change or add additional? (3 posts)

  1. fizzyfozzy
    Posted 1 year ago #

    I would like to pass the data collected in my contact form 7 forms through to our CRM. To do this I need to point the form action to a specific url.
    Is this something I can overwrite in the 'Additional settings' box somehow?

    Thanks in advance.



  2. WorksIQ
    Posted 1 year ago #

    Try something like this in your additional settings:

    on_sent_ok: "location = 'http://www.yourdomain.com/yourCRMpage/?name='+$('#name').val()+'&company='+$('#company').val();"

    Where you have something like this in your contact form (note the id):

    [text name id:name]
    [text company id:company]

    When the user completes the form the page will redirect to http://www.yourdomain.com/yourCRMpage passing name and company as parameters in the query string.

    Does that help?

    Alternatively if your CRM has inbound email processing then why not just fire the email straight into the system and have the CRM process the email instead? That will save having to make changes to your website.

  3. fizzyfozzy
    Posted 1 year ago #

    Thanks for your help WorksIQ but unfortunately that won't do the job I need it to.

    I am trying to integrate with Click Dimensions for Dynamics CRM and it requires me to chnage the form action to point to a specific url.

    I have now managed to get the form action to change on one particular form by using the following code:

    //change form action
    function wpcf7_custom_form_action_url($url)
    	if (is_page(4702)) {
    		return 'http://analytics-eu.clickdimensions.com/####';
    	} else {
    		return $url;
    add_filter('wpcf7_form_action_url', 'wpcf7_custom_form_action_url');

    But although in the source view I can see the form action has changed, when I click submit the loading arrow just spins and we get no further. I don't get a success or error message and the data is not passed through to Click Dimensions either.

    I'll have to do some more digging I think...

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Contact Form 7
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic