Ignore Save & Continue Value

Code

Filename: gppa-ignore-save-and-continue-value.php

<?php
/**
 * Gravity Perks // Populate Anything // Ignore Save & Continue Value
 * https://gravitywiz.com/documentation/gravity-forms-populate-anything/
 */
add_filter( 'gform_incomplete_submission_post_get', function( $submission_json, $resume_token, $form ) {
	// Update "123" to your form ID.
	if ( $form['id'] == 123 ) {
		$submission = json_decode( $submission_json, ARRAY_A );
		// Update "4" to the ID of the field that should *not* be repopulated from Save & Continue.
		$submission['submitted_values'][4] = '';
		$submission_json                   = json_encode( $submission );
	}
	return $submission_json;
}, 10, 3 );

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.