The Community forums are being phased out in favor of a new Slack group.
Add your email address below to get an invitation to join the community slack group
Entry ID in User Profile ONLY if Submitted
---open php---
function show_custom_profile_fields( $user ) {
---close php---
Additional profile information
---open php---
}
user_id ) {
return; //don't continue if no user
}
if( FrmProFormsHelper::saving_draft($form_id) ) {
return;
} else {
update_user_meta( $entry->user_id, 'frm_entry_id', $entry_id );
}
}
}
add_action('frm_after_create_entry', 'add_entry_id_to_user', 30, 2);
/*SHORTCODE DEPENDING ON THE EXISTENCE OF ENTRY ID*/
function frm_entry_shortcode() {
global $current_user;
get_currentuserinfo();
if ($current_user) {
$usermeta = get_user_meta($current_user->ID, 'frm_entry_id', true);
if (is_user_logged_in()) {
if(empty($usermeta)) {
$listing_link = 'HTML here if NO Entry ID';
} else {
$listing_link = 'HTML here if there IS an Entry ID';
}
} else {
$listing_link = '';
}
return $listing_link;
}
}
add_shortcode( 'is_frm_entry', 'frm_entry_shortcode' );
September 29, 2017 at 10:19 am
Sorry for the issues with formatting. This should give you the idea though.
Discussion closed.