ri_page_changed

The Gravity Forms Data Persistence Add-On Reloaded ri page changed function.

Description

ri_page_changed( $form, $coming_from_page, $current_page ); 

Parameters (3)

0. $form
The form.
1. $coming_from_page
The coming from page.
2. $current_page
The current page.

Usage

  1. if ( !function_exists( 'ri_page_changed' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'gravity-forms-data-persistence-add-on-reloaded/gravity-forms-data-persistence-add-on-reloaded.php'; 
  3.  
  4. // The form. 
  5. $form = null; 
  6.  
  7. // The coming from page. 
  8. $coming_from_page = null; 
  9.  
  10. // The current page. 
  11. $current_page = null; 
  12.  
  13. // NOTICE! Understand what this does before running. 
  14. $result = ri_page_changed($form, $coming_from_page, $current_page); 
  15.  

Defined (1)

The function is defined in the following location(s).

/gravity-forms-data-persistence-add-on-reloaded.php  
  1. function ri_page_changed( $form, $coming_from_page, $current_page ) { 
  2.  
  3. if ( gfdp_is_persistent( $form ) ) { 
  4.  
  5. $transient_key = ri_gfdp_getFormTransientKeyForGF( $form ); 
  6. $data = ri_gfdp_sanitize_data( $_POST, $form ); 
  7. set_transient( $transient_key, json_encode( $data ), ri_gfdp_getFormTransientExpiration($form) );