GFPDFHelperFieldsField_Default

Controls the display and output of a Gravity Form field.

Defined (1)

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

/src/helper/fields/Field_Default.php  
  1. class Field_Default extends Helper_Abstract_Fields { 
  2.  
  3. /** 
  4. * Display the HTML version of this field 
  5. * @param string $value 
  6. * @param bool $label 
  7. * @return string 
  8. * @since 4.0 
  9. */ 
  10. public function html( $value = '', $label = true ) { 
  11.  
  12. $html = GFCommon::get_lead_field_display( $this->field, $this->get_value(), $this->entry['currency'] ); 
  13. $html = apply_filters( 'gform_entry_field_value', $html, $this->field, $this->entry, $this->form ); 
  14.  
  15. return parent::html( $html ); 
  16.  
  17. /** 
  18. * Get the standard GF value of this field 
  19. * @return string|array 
  20. * @since 4.0 
  21. */ 
  22. public function value() { 
  23. if ( $this->has_cache() ) { 
  24. return $this->cache(); 
  25.  
  26. $this->cache( esc_html( $this->get_value() ) ); 
  27.  
  28. return $this->cache();