Disable Field Conditional Logic When Editing

Removes conditional logic functionality on Entry Blocks’ Edit Page.

Code

Filename: gpeb-disable-conditional-logic.php

<?php
/**
 * Gravity Perks // Entry Blocks // Disable Field Conditional Logic When Editing
 * https://gravitywiz.com/documentation/gravity-forms-entry-blocks/
 *
 * Removes conditional logic functionality on Entry Blocks' Edit Page.
 */
add_filter( 'gpeb_edit_form', function ( $form ) {
	foreach ( $form['fields'] as &$field ) {
		$field['conditionalLogic'] = '';
	}

	return $form;
} );

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.