Add a Custom Auto-Progression Condition

Use this filter to register a field type and callback function that can check a field’s configuration to determine if it can support auto-progresion.

Code

Filename: gppt-add-custom-auto-progress-condition.php

<?php
/**
 * Gravity Perks // Page Transitions // Add a Custom Auto-Progression Condition
 * https://gravitywiz.com/documentation/gravity-forms-page-transitions/
 *
 * Use this filter to register a field type and callback function that can check a field's configuration
 * to determine if it can support auto-progresion.
 */
add_filter( 'gppt_auto_progress_support_conditions', 'add_custom_auto_progress_condition' );
function add_custom_auto_progress_condition( $conditions ) {
	$conditions[] = array(
		'type'     => 'my_custom_field_type',
		'callback' => 'my_custom_field_callback_func',
	);
	return $conditions;
}

function my_custom_field_callback_func( $field ) {
	return $field->someFeature == true;
}

Leave a Reply

Your email address will not be published. Required fields are marked *

  • Trouble installing this snippet? See our troubleshooting tips.
  • Need to include code? Create a gist and link to it in your comment.
  • Reporting a bug? Provide a URL where this issue can be recreated.

By commenting, I understand that I may receive emails related to Gravity Wiz and can unsubscribe at any time.