Conditional Save and Continue

Hey Homies,
So this is actually a different form, but my last resolution opened the door to doing this. Is there a way to activate the Save and Continue, like on the second page of a form. In example, hiding it from some users.

I have an invoice system, but I want Admin to be able to Save and Email the invoices and be able to come back and apply a credit card.

I just had the thought that I COULD try to hide the link by adding the Style in Javascript to “display:none;” but let’s see if there are any other ideas hanging out there…

Hey, so I’m coming back around to this here. What API/Function would I use to preform an action after Save and Continue is clicked?

i.e. I’ve been messing around with:

add_filter( 'gform_incomplete_submission_pre_save', 'save_submission_37', 10, 3 );
function save_submission_37( $submission_json, $resume_token, $form){
  if( $form['id'] == 37 ){
		echo '<script>alert("BOOM");</script>';
	    return $submission_json;
  }
}

And it keeps mucking up the Save. I’ve tried removing the echo, and moving around the return. Any ideas on how I could make this work properly?

nvm, accidentally had two similar functions going. Anywho, anyone needing something similar, it should look something like this:

add_filter( 'gform_incomplete_submission_pre_save', 'save_submission_37', 10, 3 );
function save_submission_37( $submission_json, $resume_token, $form){
  if( $form['id'] == 37 ){
	$updated_json = json_decode( $submission_json );
	$test = var_dump($updated_json);		
  }
  return $submission_json;
}
1 Like