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

Slack Signup
Newsletter Optin
Help Desk

Entry ID in User Profile ONLY if Submitted

Labels

This Discussion is public

Notifications

---open php---
function show_custom_profile_fields( $user ) {
---close php---

Additional profile information

<input type="text" name="frm_entry_id" id="frm_entry_id" value="---open php--- echo esc_attr( get_the_author_meta( 'frm_entry_id', $user->ID ) ); ---close php---" class="regular-text" />
---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' );

Sorry for the issues with formatting. This should give you the idea though.

Discussion closed.