<default_value>

The Ninja Forms default value shortcode.


Usage

  1. // assign value 
  2. $default_value = 'dynamic_tag'; 
  3.  
  4. // basic usage 
  5. echo do_shortcode("[$default_value]"); 
  1. // assign value 
  2. $default_value = 'dynamic_tag'; 
  3.  
  4. // variable usage 
  5. $result = do_shortcode("[$default_value]"); 
  6. echo $result;  

Defined (2)

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

/deprecated/includes/display/fields/default-value-filter.php  
  1.  
  2. if ( $default_value === false and isset ( $data['default_value'] ) ) { 
  3. $default_value = $data['default_value']; 
  4. if ( is_string( $default_value ) ) 
  5. $default_value = do_shortcode( $default_value ); 
  6.  
  7.  
  8. if ( isset ( $ninja_forms_fields[ $field_type ]['process_field'] ) and $ninja_forms_fields[ $field_type ]['process_field'] ) { 
  9. $data['default_value'] = $default_value; 
/deprecated/includes/fields/desc.php  
  1. if( isset( $data['display_style'] ) ) { 
  2. $display_style = $data['display_style']; 
  3. }else{ 
  4. $display_style = ''; 
  5. $default_value = do_shortcode( $default_value ); 
  6. $field_class = ninja_forms_get_field_class( $field_id, $form_id ); 
  7. $field_class .= ' nf-desc'; 
  8. ?> 
  9. <<?php echo $desc_el;?> class="<?php echo $field_class;?>" id="ninja_forms_field_<?php echo $field_id;?>_div_wrap" style="<?php echo $display_style;?>" rel="<?php echo $field_id;?>"><?php echo $default_value;?></<?php echo $desc_el;?>> 
  10. <?php