nf_field_text_sub_table_value

Output the value that shows up in the submissions table.

Description

nf_field_text_sub_table_value( $field_id, $user_value ); 

Parameters (2)

0. $field_id
The field id.
1. $user_value
The user value.

Usage

  1. if ( !function_exists( 'nf_field_text_sub_table_value' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'ninja-forms/deprecated/includes/fields/textbox.php'; 
  3.  
  4. // The field id. 
  5. $field_id = null; 
  6.  
  7. // The user value. 
  8. $user_value = null; 
  9.  
  10. // NOTICE! Understand what this does before running. 
  11. $result = nf_field_text_sub_table_value($field_id, $user_value); 
  12.  

Defined (1)

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

/deprecated/includes/fields/textbox.php  
  1. function nf_field_text_sub_table_value( $field_id, $user_value ) { 
  2. // Cut down our string if it is longer than 140 characters. 
  3. $max_len = apply_filters( 'nf_sub_table_user_value_max_len', 140, $field_id ); 
  4. if ( strlen( $user_value ) > 140 ) 
  5. $user_value = substr( $user_value, 0, 140 ); 
  6.  
  7. echo nl2br( $user_value );