Skip to content

Instantly share code, notes, and snippets.

@Idealien
Created September 23, 2014 03:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save Idealien/8e67b36218295b32307b to your computer and use it in GitHub Desktop.
Save Idealien/8e67b36218295b32307b to your computer and use it in GitHub Desktop.
GF Entry Manipulation
<?php
add_filter("gform_after_submission", "post_form_anonymize", 10 , 2);
//Gravity Form Submission
function post_form_anonymize($entry, $form){
$cssClasses = preg_split('/[\ \n\,]+/', $form['cssClass']);
if (in_array("anonymize", $cssClasses)) {
RGFormsModel::update_lead_property($entry['id'], "created_by","1");
RGFormsModel::update_lead_property($entry['id'], "ip","XXX.YYY.XXX.YYY");
}
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment