GFPDFHelperFieldsField_v3_Section

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_v3_Section.php  
  1. class Field_v3_Section extends Field_Section { 
  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. /** sanitize the HTML */ 
  12. $section = $this->value(); /** allow the same HTML as per the post editor */ 
  13.  
  14. $html = '<h2 class="default entry-view-section-break" id="field-' . $this->field->id . '">' . $section['title'] . '</h2>'; 
  15.  
  16. if ( ! empty( $value ) ) { 
  17. $html .= '<div class="default entry-view-section-break entry-view-section-break-content">' . $section['description'] . '</div>'; 
  18.  
  19. return $html; 
  20.