ninja_forms_add_calc_row

Function that outputs a calculation row.

Description

ninja_forms_add_calc_row(); 

Usage

  1. if ( !function_exists( 'ninja_forms_add_calc_row' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'ninja-forms/deprecated/includes/admin/ajax.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = ninja_forms_add_calc_row(); 
  7.  

Defined (1)

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

/deprecated/includes/admin/ajax.php  
  1. function ninja_forms_add_calc_row() { 
  2. // Bail if we aren't in the admin 
  3. if ( ! is_admin() ) 
  4. return false; 
  5.  
  6. check_ajax_referer( 'nf_ajax', 'nf_ajax_nonce' ); 
  7.  
  8. $field_id = absint( $_REQUEST['field_id'] ); 
  9. $c = array( 'calc' => '', 'operator' => 'add', 'value' => '', 'when' => '' ); 
  10. $x = absint( $_REQUEST['x'] ); 
  11.  
  12. ninja_forms_output_field_calc_row( $field_id, $c, $x ); 
  13. die();