PHP code example of framecreative / gravityforms-form-integrator

1. Go to this page and download the library: Download framecreative/gravityforms-form-integrator library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

framecreative / gravityforms-form-integrator example snippets


 
 
 add_filter('gf_form_integrator_modify_dynamic_field_value', 'myFormIntegratorFilter', 10, 7);
 
 // This filter is applied to each dynamic field map pairing before it's added to the array
 function myFormIntegratorFilter(  $fieldValue, $fieldName, $fieldObject, $formIntegratorObject, $gf_feedArray, $gf_entryArray, $gf_formArray ){
    // Do Stuff here
    return $fieldValue;
 };
 
 // Even though filters technically shouldn't cause side effects, you can add additional items to the array via 
 // $formIntegratorObject->_postDataValues['my_extra_key'] = 'my_extra_value'
 
 // return false to prevent this value from being added to the 'postDataValues' array
 

  
  
  add_filter('gf_form_integrator_modify_values_pre_submit', 'myFormIntegratorArrayFilter', 10, 4);
  
  // This filter is applied once right before the POST request is made
  function myFormIntegratorFilter(  $arrayOfData, $gf_feedArray, $gf_entryArray, $gf_formArray ){
     // Do Stuff here
     return $arrayOfData;
  };
  
   // return false to prevent the submission of ALL VALUES to the service (cancel the whole thing)
   // use with caution, implement logging in your filter if you are going to short circuit things (add a note or something)