Scenario: User inputs Social Security Number via form. Using gform_post_submission hook, I am trying to encrypt the entry's SSN (which is $entry['5']).
Code (most of the beef has been removed):
#####################################
function encryptStringArray($stringArray, $entryID, $key = "somecoolkey") {
$s = DOSOMEENCRYPTIONHERE($stringArray, $key);
gform_update_meta($entryID, $entry['5'], $s);
return $s;
}
add_action("gform_post_submission", "hNotify", 10, 2);
function hNotify($entry, $form){
$entryID = $entry["id"];
$ssn = encryptStringArray($entry["5"], $entry);
}
Based on the [ever-lacking] documentation, it appears like I should use this function: gform_update_meta
However, the examples: #1 SUCK (in explanation, implementation, and as an example... fail), #2 don't work (the entry goes through, PHP error prevents full functionalities).
So can anyone please shed some light on how one goes about updating an entry after it has been pushed to the database?
http://www.gravityhelp.com/documentation/page/Gform_update_meta