Home › Forums › Quform WordPress › Add contacts to ActiveCampaign list
- This topic has 4 replies, 2 voices, and was last updated 5 years, 4 months ago by
artwstudio.
- AuthorPosts
- April 17, 2020 at 2:56 pm #30984
artwstudio
ParticipantHey I’m using this code to add contacts in AC;
` add_filter(‘quform_post_process_2’, function (array $result, Quform_Form $form) {
$apiUrl = ‘https://mariowow98.api-us1.com’;
$apiKey = ‘api_key’;
$data = array(
‘contact’ => array(
’email’ => $form->getValue(‘quform_2_369’),
‘firstName’ => $form->getValue(‘quform_2_371’)[2],
‘lastName’ => $form->getValue(‘quform_2_371’)[4],
‘phone’ => $form->getValue(‘quform_2_372’),
)
);wp_remote_post($apiUrl . ‘/api/3/contacts’, array(
‘headers’ => array(
‘Api-Token’ => $apiKey
),
‘body’ => wp_json_encode($data)
));return $result;
}, 10, 2); `I need to add contacts to a specifically list, how can i do?
Thanks themecatcher
- This topic was modified 5 years, 5 months ago by
artwstudio.
- This topic was modified 5 years, 5 months ago by
Ally. Reason: removed private info
April 20, 2020 at 11:02 am #30990Ally
Support StaffYou don't have permission to view this content. Please log in or register and then verify your purchases to gain access.
April 20, 2020 at 8:10 pm #30998artwstudio
ParticipantOkay, thank you very much.
I’ll wait for the codeApril 22, 2020 at 11:30 am #31015Ally
Support StaffYou don't have permission to view this content. Please log in or register and then verify your purchases to gain access.
April 22, 2020 at 11:44 am #31018artwstudio
ParticipantThe code works well! Thanks u so much!!
- This topic was modified 5 years, 5 months ago by
- AuthorPosts
- You must be logged in to reply to this topic.