Hi i know our good friend John Linhart published a post on Medium about it
But like me there are so many user that are not programmer…
So if we can be more clear in the steps to make our beautiful app Mautic work in our company and have a space in our hearts please lets try to figure out a way to do it.
Here is the script code publish by John.
Code:
<?php
/**
* Push data to a Mautic form
*
* @param array $data The data submitted by your form
* @param integer $formId Mautic Form ID
* @param string $ip IP address of the lead
* @return string
*/
function pushMauticForm($data, $formId, $ip)
{
$data['formId'] = $formId;
// return has to be part of the form data array
if (!isset($data['return'])) {
$data['return'] = 'http://where-to-redirect.com';
}
Hi i know our good friend John Linhart published a post on Medium about it
But like me there are so many user that are not programmer…
So if we can be more clear in the steps to make our beautiful app Mautic work in our company and have a space in our hearts please lets try to figure out a way to do it.
Here is the script code publish by John.
[code]<?php
/**
Push data to a Mautic form
@param array $data The data submitted by your form
@param integer $formId Mautic Form ID
@param string $ip IP address of the lead
@return string
*/
function pushMauticForm($data, $formId, $ip)
{
$data[‘formId’] = $formId;
// return has to be part of the form data array
if (!isset($data[‘return’])) {
$data[‘return’] = ‘http://where-to-redirect.com’;
}
$data = array(‘mauticform’ => $data);
// Change [path-to-mautic] to URL where your Mautic is
$formUrl = ‘http://[path-to-mautic]/form/submit?formId=’ . $formId;
I don’t want to be rude or something, but if you want to connect 2 different systems together, you need a person with the skills to do that. That person has to know both systems and some programming. You didn’t even mention what the second system is.
You don’t need to change anything in that script. It’s ready to use. You just have to paste it to the right place and call that function with correct parameters.
As usually in many other areas of life, you have 2 choices:
You don't need to change anything in that script. It's ready to use. You just have to paste it to the right place and call that function with correct parameters.
It’s a function. All you have to do is to call it with the parameters. Example of how to call it is in the Medium article.