cf7_infusionsoft_addon_signup_form_submitted

The Contact Form 7 - Infusionsoft Add-on cf7 infusionsoft addon signup form submitted function.

Description

cf7_infusionsoft_addon_signup_form_submitted( $contact_form ); 

Parameters (1)

0. $contact_form
The contact form.

Usage

  1. if ( !function_exists( 'cf7_infusionsoft_addon_signup_form_submitted' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'contact-form-7-infusionsoft-add-on/cf7-infusionsoft-addon.php'; 
  3.  
  4. // The contact form. 
  5. $contact_form = null; 
  6.  
  7. // NOTICE! Understand what this does before running. 
  8. $result = cf7_infusionsoft_addon_signup_form_submitted($contact_form); 
  9.  

Defined (1)

The function is defined in the following location(s).

/cf7-infusionsoft-addon.php  
  1. function cf7_infusionsoft_addon_signup_form_submitted( $contact_form ) { 
  2. $contact_form_id = $contact_form->id(); 
  3.  
  4. $submission = WPCF7_Submission::get_instance(); 
  5. $posted_data = $submission->get_posted_data();  
  6.  
  7. // If the email address is not set 
  8. if ( empty( $posted_data['infusionsoft-email'] ) ) { 
  9. return; 
  10. // If all looks good, let's try to add the user 
  11. cf7_infusionsoft_addon_add_contact($contact_form_id, $posted_data);