5 if ( ! defined(
'GRAVITYVIEW_DIR' ) ) {
18 public static $slug =
'table';
29 $source = is_numeric( $field->ID ) ? ( GF_Form::by_id( $field->form_id ) ? : $this->view->form ) :
new Internal_Source();
31 return $renderer->render( $field, $this->view, $source, $this->entry->from_field( $field ), $this->request );
42 $fields = $this->view->fields->by_position(
'single_table-columns' )->by_visible( $this->view );
44 $context = Template_Context::from_template( $this, compact(
'fields' ) );
53 $fields = Field_Collection::from_configuration( $fields );
61 $fields = apply_filters(
'gravityview/template/table/fields', $fields, $context );
63 foreach ( $fields->all() as
$field ) {
64 $context = Template_Context::from_template( $this, compact(
'field' ) );
76 $column_label = apply_filters(
'gravityview_render_after_label',
$field->get_label( $this->view,
$form,
$entry ),
$field->as_configuration() );
77 $column_label = apply_filters(
'gravityview/template/field_label', $column_label,
$field->as_configuration(),
$form->form ?
$form->form : null,
$entry->as_entry() );
85 $column_label = apply_filters(
'gravityview/template/field/label', $column_label, $context );
92 $hide_empty = apply_filters(
'gravityview/render/hide-empty-zone', $this->view->settings->get(
'hide_empty_single',
false ), $context );
95 'entry' => $this->entry->as_entry(),
96 'field' => is_numeric(
$field->ID ) ?
$field->as_configuration() : null,
97 'label' => $column_label,
98 'value' => $this->the_field(
$field ),
99 'markup' =>
'<tr id="{{ field_id }}" class="{{ class }}"><th scope="row">{{ label }}</th><td>{{ value }}</td></tr>',
100 'hide_empty' => $hide_empty,
101 'zone_id' =>
'single_table-columns',
If this file is called directly, abort.
static getInstance( $passed_post=NULL)
the_field(\GV\Field $field)
Output a field cell.
If this file is called directly, abort.
if(gravityview() ->plugin->is_GF_25()) $form
If this file is called directly, abort.
If this file is called directly, abort.
the_entry()
Out the single entry table body.
If this file is called directly, abort.
gravityview_field_output( $passed_args, $context=null)
Output field based on a certain html markup.