Docly

Mautic

Estimated reading: 1 minute

getForms

Function to retrieve all Mautic forms. When $id is passed, only one form is returned.
				
					/**
   * 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 = ''){}				
			

createForm

This function will create a new Mautic form from a Gravity Forms form and its fields.
				
					/**
   * @param $type string Type can be Campaign or Standalone
   * @param $form array The gravity Forms form as an array
   */
  public function createForm($type, $form){}				
			

postFormEntry

This function sends a wp_remote_post () request directly to Mautic. This is necessary because Mautic needs the visitor’s IP address to identify the contact.
				
					/**
   * @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){}				
			

updateEntry

This feature updates a Mautic form submission based on certain conditions.
				
					/**
   * @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){}