ninja_forms_save_form_settings

The Ninja Forms ninja forms save form settings function.

Description

ninja_forms_save_form_settings( $form_id, $data ); 

Parameters (2)

0. $form_id
The form id.
1. $data
The data.

Usage

  1. if ( !function_exists( 'ninja_forms_save_form_settings' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'ninja-forms/deprecated/includes/admin/pages/ninja-forms/tabs/form-settings/form-settings.php'; 
  3.  
  4. // The form id. 
  5. $form_id = null; 
  6.  
  7. // The data. 
  8. $data = null; 
  9.  
  10. // NOTICE! Understand what this does before running. 
  11. $result = ninja_forms_save_form_settings($form_id, $data); 
  12.  

Defined (1)

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

/deprecated/includes/admin/pages/ninja-forms/tabs/form-settings/form-settings.php  
  1. function ninja_forms_save_form_settings( $form_id, $data ) { 
  2. global $wpdb, $ninja_forms_admin_update_message; 
  3.  
  4. foreach ( $data as $key => $val ) { 
  5. if ( 'form_title' == $key ) { 
  6. $val = esc_html( $val ); 
  7. Ninja_Forms()->form( $form_id )->update_setting( $key, $val ); 
  8.  
  9. $update_msg = __( 'Form Settings Saved', 'ninja-forms' ); 
  10. return $update_msg;