I have tried the code below but it just returns a 0.
I assume that means that the wp user_id has not been created yet when the hook frm_after_create_entry fires. Any thoughts on how to get this number? I can't get it from user meta and I can't get it from the form entry at least it isn't visible.
The field key refers to the special formidable field User ID that does not show on the form
$userid0010= FrmField::get_id_by_key('userid0010');
$wp_userid => $_POST['item_meta'][$userid0010];
Thanks,
J
The user id is definitely created by the time frm_after_create_entry fires, otherwise the user id wouldn't be saved with the form entry. Every table row in frm_items and frm_item_metas has a reference field to user id. When you debug your code, have you tried pausing the execution of your callback and directly examining the $_POST associative array values? Have you used PHPMyAdmin to confirm the user_id is stored with the entry records? Are you absolutely certain 'userid0010' is the correct field key for the user_id field on the form?
Please login or Register to submit your answer