← Back to Documentation

Conditional Logic [Pro]

How It Works

GF Repeater supports Gravity Forms’ native conditional logic inside repeater groups. Each row’s conditional logic is evaluated independently.

Architecture

  1. CL data is captured from repeater fields before rendering (priority 5)
  2. CL is stripped from fields so GF doesn’t apply it globally (priority 10)
  3. Captured data is output as window.gfrRepeatCLData in the page footer
  4. JS module evaluates rules per-row using the captured data

Example

Repeater group for team members:

Row 1 selects “Developer” — GitHub field appears. Row 2 selects “Designer” — Portfolio field appears. Independent per row.

Server-Side Evaluation

During validation and sticky row rendering, CL is evaluated server-side. Hidden fields are:

Supported operators: is, isnot, >, <, contains, starts_with, ends_with

Logic types: all (AND), any (OR)

Client-Side Evaluation

The JS module fires on:

For sticky rows, values are read from the data-row-values attribute (JSON).

Limitations

Fields referenced in conditions must be within the same group. Cross-group CL is not supported.

Using Row Count in CL

The Conditional Row Limits module injects a hidden input tracking the row count. This lets you use GF’s standard CL rules outside the repeater — e.g., show a summary only when 3+ rows exist.

Custom Visibility Override

add_filter( 'gfr_is_field_hidden', function( $hidden, $field, $form, $row_values ) {
    if ( (int) $field->id === 5 ) return false; // always show
    return $hidden;
}, 10, 4 );