Hi,
I am trying to store the submission entry URL to the profile of the user who submitted the form.
Is there a way to get the entry URL and post it to the user using gform_after_submission?
Thank you
Hi,
I am trying to store the submission entry URL to the profile of the user who submitted the form.
Is there a way to get the entry URL and post it to the user using gform_after_submission?
Thank you
Found the solution, if anyone else is looking here this out:
add_action( 'gform_after_submission_30', 'wpse96468_map_user_to_entry', 10, 2 );
function wpse96468_map_user_to_entry( $entry, $form ) {
$user_id = $entry['created_by'];
$meta_key = 'gform_entry_id';
$meta_value = $entry['id'];
//Custom Meta Tags
update_user_meta( $user_id, 'field_name', '/wp-admin/admin.php?page=gf_entries&view=entry&id=5&lid=' . $meta_value );
//or ACF
update_field('field_name', '/wp-admin/admin.php?page=gf_entries&view=entry&id=5&lid=' . $meta_value, 'user_' . $user_id );
}
Thank you for sharing that solution Tara.