title: Ninja forms post process
body: <p>Good morning everyone,</p>
  
  <p>I am working on an API of Enormail and want data from a ninja form send to the Enormail (similar to Chimpmail). Unluckily Enormail isn't as supported as Chimpmail, but my client would like to use this service.</p>
  
  <p>Right now I have the following code working in my functions.php but it doesn't seem to work:</p>
  
  <pre><code>function add_to_enormail( $form_id ) {
     global $ninja_forms_processing;
     $form_id = $ninja_forms_processing-&gt;get_form_ID();
     if (  $form_id == 2 || $form_id == 3 ) {
         switch ($form_id) {
         case 1: //Form 1 
             $ninjamail = $ninja_forms_processing-&gt;get_field_value( 6 );
             break;
         case 2: //Form 2
             $ninjaname = $ninja_forms_processing-&gt;get_field_value( 13 );
             $ninjamail = $ninja_forms_processing-&gt;get_field_value( 10 );
             break;
       }  
     }
    require_once ('/emapi/emapi.php');
    $em = new emapi('API KEY OF USER', 'JSON');
    $result = $em-&gt;contacts-&gt;add('API OF CERTAIN LIST', $ninjaname, $ninjamail);
  };
  
  add_action( 'ninja_forms_post_process', 'add_to_enormail' );
  </code></pre>
  
  <p>If I add the require_once code inside a different php file and call it directly a user it being added to the Enormail service, so the API is working fine.
  But it seems I can't get the data filled inside the fields and place it inside the API to add user to mailing list.</p>
  
  <p>What is going wrong here.
  Thanks</p>