GFPDFHelperFieldsField_v3_Products

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_Products.php  
  1. class Field_v3_Products extends Field_Products { 
  2.  
  3.  
  4. /** 
  5. * Display the HTML version of this field 
  6. * @param string $value 
  7. * @param bool $label 
  8. * @return string 
  9. * @since 4.0 
  10. */ 
  11. public function html( $value = '', $label = true ) { 
  12. $html = parent::html( $value, $label ); 
  13.  
  14. /** Format the order label correctly */ 
  15. $label = apply_filters( 'gform_order_label', esc_html__( 'Order', 'gravityforms' ), $this->form->id ); 
  16. $label = apply_filters( 'gform_order_label_' . $this->form->id, $label, $this->form->id ); 
  17.  
  18. $heading = '<h2 class="default entry-view-section-break">' . $label . '</h2>'; 
  19.  
  20. /** Pull out the .entry-products table from the HTML using querypath */ 
  21. $qp = new Helper_QueryPath(); 
  22. $table = $qp->html5( $html, 'div.inner-container' )->innerHTML5(); 
  23.  
  24. $html = $heading; 
  25. $html .= $table; 
  26.  
  27. return $html; 
  28.