Answer the question
In order to leave comments, you need to log in
How to make FormIt [MODX] and ROISTAT friends?
Hello omniscient ALL!
There is a site on MODX and a form on the site page. The form is processed using FormIt. There is a need, in addition to directly sending the form itself, to send more data from this form in an array to ROISTAT. The latter proposes to implement the integration in this way .
Tell me which way to dig?
Answer the question
In order to leave comments, you need to log in
I asked it myself, and I’ll answer it myself:
Here we put this into a snippet, for example: hook.Roistat
<?php
$roistatData = array(
'roistat' => isset($_COOKIE['roistat_visit']) ? $_COOKIE['roistat_visit'] : null,
'key' => 'key',
'title' => $hook->getValue('name') . ' (' . $hook->getValue('ticket') . ')',
'name' => $hook->getValue('name'),
'email' => $hook->getValue('email'),
'phone' => $hook->getValue('telephone'),
'is_need_callback' => '0',
);
file_get_contents("https://cloud.roistat.com/api/proxy/1.0/leads/add?" . http_build_query($roistatData));
return true;
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question