cf_custom_fields_get_form

Get Caldera Forms.

Description

(array|void) cf_custom_fields_get_form( (string) $id_name ); 

Includes backwards compat for pre-Caldera Forms 1.3.4

Returns (array|void)

Parameters (1)

0. $id_name (string)
ID or name of form

Usage

  1. if ( !function_exists( 'cf_custom_fields_get_form' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'caldera-custom-fields/core.php'; 
  3.  
  4. // ID or name of form 
  5. $id_name = ''; 
  6.  
  7. // NOTICE! Understand what this does before running. 
  8. $result = cf_custom_fields_get_form($id_name); 
  9.  

Defined (2)

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

/core.php  
  1. function cf_custom_fields_get_form( $id_name ) { 
  2. if ( class_exists( 'Caldera_Forms_Forms' ) ) { 
  3. $form = Caldera_Forms_Forms::get_form( $id_name ); 
  4. } else { 
  5. $form = Caldera_Forms::get_form( $id_name ); 
  6.  
  7. if( isset( $form[ 'ID' ] ) && ! isset( $form[ 'id' ] ) ) { 
  8. $form[ 'id' ] = $form[ 'ID' ]; 
  9.  
  10. return $form; 
  11.  
  1. function cf_custom_fields_get_form( $id_name ) { 
  2. if ( class_exists( 'Caldera_Forms_Forms' ) ) { 
  3. $form = Caldera_Forms_Forms::get_form( $id_name ); 
  4. } else { 
  5. $form = Caldera_Forms::get_form( $id_name ); 
  6.  
  7. if( isset( $form[ 'ID' ] ) && ! isset( $form[ 'id' ] ) ) { 
  8. $form[ 'id' ] = $form[ 'ID' ]; 
  9.  
  10. return $form; 
  11.