Need to update a hidden field in a form with an ID number after the form has just been submitted. The ID is calculated by PHP running in a gform_post_submission hook within the theme's functions.php file.
I thought about writing directly into the GF database like this:
$wpdb->query("UPDATE $wpdb->wp_rg_lead_detail SET value = 'New Value' WHERE lead_id = 30 AND field_number = 81");
However, that doesn't seem to update. No error given, just no update happens.
Is there a smarter way to do this by calling a function already in the Gravity Forms library?