ninja_forms_get_form_by_id

Return form data.

Description

(array) ninja_forms_get_form_by_id( (int) $form_id ); 

Returns (array)

$form

Parameters (1)

0. $form_id (int)
The form id.

Usage

  1. if ( !function_exists( 'ninja_forms_get_form_by_id' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'ninja-forms/deprecated/includes/deprecated.php'; 
  3.  
  4. // The form id. 
  5. $form_id = -1; 
  6.  
  7. // NOTICE! Understand what this does before running. 
  8. $result = ninja_forms_get_form_by_id($form_id); 
  9.  

Defined (2)

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

/deprecated/includes/deprecated.php  
  1. function ninja_forms_get_form_by_id( $form_id ) { 
  2. $settings = Ninja_Forms()->form( $form_id )->get_all_settings(); 
  3. $date_updated = Ninja_Forms()->form( $form_id )->get_setting( 'date_updated' ); 
  4. return array( 'id' => $form_id, 'data' => $settings, 'date_updated' => $date_updated ); 
/includes/deprecated.php  
  1. function ninja_forms_get_form_by_id( $form_id ) { 
  2. Ninja_Forms::deprecated_notice( $hook, '3.0', null ); 
  3. return array();