Docly

Mautic

Estimated reading: 1 minute

getForms

Functie om alle Mautic formulieren op te halen. Wanneer $id is doorgegeven, wordt slechts één formulier geretourneerd.

/**
 * Function to retrieve all Mautic forms. When $id is passed, only one form is returned
 *
 * @param $id int Id of a Mautic form
 * @return array $forms Returns an array of Mautic forms
 */
public function getForms($id = ''){}
PHP

createForm

Deze functie zal een nieuw Mautic-formulier creëren op basis van een Gravity Forms-formulier en zijn velden.

/**
 * @param $type string Type can be Campaign or Standalone
 * @param $form array The gravity Forms form as an array
 */
public function createForm($type, $form){}
PHP

postFormEntry

Deze functie stuurt rechtstreeks een wp_remote_post() verzoek naar Mautic. Dit is nodig omdat Mautic het IP-adres van de bezoeker nodig heeft om het contact te identificeren.

/**
 * @param $form_id int Id of the Mautic form
 * @param $data array Array of the data to post to the form
 */
public function postFormEntry($form_id, $data){}
PHP

updateEntry

Met deze functie wordt een Mautic-formulier inzending bijgewerkt op basis van bepaalde voorwaarden.
/**
 * @param int $mautic_form_id The Mautic form ID
 * @param array $where Array of conditions
 * @param array $updates Array of fields to update
 */
function updateEntry($mautic_form_id, $where, $updates){}
PHP