PHP code example of bostondv / acf-ninja-forms
1. Go to this page and download the library: Download bostondv/acf-ninja-forms 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/ */
bostondv / acf-ninja-forms example snippets
$form = get_field( 'your_form_field' );
if ( class_exists( 'Ninja_Forms' ) ) {
Ninja_Forms()->display( $form[ 'id' ] );
}
$form = get_field( 'your_form_field' );
if ( function_exists( 'ninja_forms_display_form' ) ) {
ninja_forms_display_form( $form[ 'id' ] );
}
$forms = get_field('your_forms');
foreach( $forms as $form ){
echo $form[ 'id' ];
}