Active Campaign Custom Fields

Home Forums Quform WordPress Active Campaign Custom Fields

This topic is: not resolved
Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #34830
    Dylan Scholtz
    Participant

    Hi

    I have used your guide to add active campaign to work with Quform – https://support.themecatcher.net/quform-wordpress-v2/guides/integration/activecampaign

    I got it to work with capturing the basic information, but there are additional fields that I would like to capture from the form to active campaign. I saw another topic (https://support.themecatcher.net/forums/topic/active-campaign-custom-fields-for-quform) about this but I am unsure if that resolved the issue as I could not get it to work.

    Code I am currently using through child themes function.php

    add_filter(‘quform_post_process_12’, function (array $result, Quform_Form $form) {
    $apiUrl = ‘* * * * * * * * *. * *. *’;
    $apiKey = ‘* * * * * * * * * * * * * * * * * * * * * * * * ‘;

    $data = array(
    ‘contact’ => array(
    ’email’ => $form->getValue(‘quform_12_1766’),
    ‘firstName’ => $form->getValue(‘quform_12_1770’)[2],
    ‘lastName’ => $form->getValue(‘quform_12_1770’)[4],
    ‘phone’ => $form->getValue(‘quform_12_1765’),
    ‘fieldValues’ => array(
    array(
    ‘field’ => ‘1’,
    ‘value’ => ‘Some value’
    ),
    array(
    ‘field’ => ‘1785’,
    ‘value’ => $form->getValue(‘quform_12_1785’)
    ),
    )
    )
    );

    wp_remote_post($apiUrl . ‘/api/3/contact/sync’, array(
    ‘headers’ => array(
    ‘Api-Token’ => $apiKey
    ),
    ‘body’ => wp_json_encode($data)
    ));

    return $result;
    }, 10, 2);

    #34831
    Ally
    Support Staff

    You don't have permission to view this content. Please log in or register and then verify your purchases to gain access.

    #34832
    Dylan Scholtz
    Participant

    The response came back as 201 and could not see any issues in the response tab.

    #34834
    Dylan Scholtz
    Participant

    I’ve tried again this morning with the code but had no luck as it still only picks up the basic fullname, lastname, email, phone. There is an additional text field that I want to pull through from the from for the Account Name on Active Campaign.

    #34850
    Ally
    Support Staff

    You don't have permission to view this content. Please log in or register and then verify your purchases to gain access.

Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.
Be inspired. © 2024 ThemeCatcher Ltd. 20-22 Wenlock Road, London, England, N1 7GU | Company No. 08120384 | Built with React | Privacy Policy