PHP Dev's Guide
MFSFS (“Multi-Form Sticky Field Sharing”)
Key Concepts for the Dev’s perspective
- The MFSFS Plugin Operates On Four Filters:
gform_validation
Submitted entry values will be captured and savedgform_pre_render
All “sticky” fields will be populated with their saved valuesgform_field_value
Special case for populating sticky List fields onlygform_replace_merge_tags
Replaces merge tag targets with available saved values
- Captured Entry Data is Saved Two Possible Ways:
- Into the logged-in user’s meta data table OR
- Into the anonymous user’s current SESSION array
Note: Saved entry data will associated to an array key name composed of
mfsfs_SYS_
+ the Admin Label. Additionally, the key used will convert all spaces and dashes into underscores (see also: User’s Guide / “Minor Note On Admin Label Naming”).
- Typical Use Cases for the PHP Dev:
- Accessing saved entry data
- Modifying user’s saved data before or after MFSFS plugin’s actions
- Useful PHP functions in MFSFS plugin include:
mfsfs_clear_all_meta()
- (Unfinished function for deleting saved data)- As of 1.0.0-rc.4 this wipes out ALL user meta data (or SESSION) values whose key is prefixed with
mfsfs_SYS_
.
- As of 1.0.0-rc.4 this wipes out ALL user meta data (or SESSION) values whose key is prefixed with
mfsfs_load_user_meta()
- (Acquire saved data)- This populates the GLOBAL $GLO_hold_user_meta array (DB’s meta or SESSION array) Note: If the global array is already populated, it gets unset first.