PHP code example of statenweb / gravity-forms-acf

1. Go to this page and download the library: Download statenweb/gravity-forms-acf 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/ */

    

statenweb / gravity-forms-acf example snippets


  

 
    $form_object = get_field('your_form_field');
    gravity_form_enqueue_scripts($form_object['id'], true);
    gravity_form($form_object['id'], true, true, false, '', true, 1); 

 
    $form_object = get_field('your_form_field');
    echo do_shortcode('[gravityform id="' . $form_object['id'] . '" title="true" description="true" ajax="true"]');


    $form_objects = get_field('your_forms');
  
    foreach($form_objects as $form){
        echo $form['title'];  
    }