Custom Registration Fields Display

Hi there,
I’m wanting to accomplish 2 things with the Custom Registration Fields.
1/ Currently I can display the user fields to logged-in users (including custom registration fields) in the front end for viewing / editing using the shortcode [s2Member-Profile /] which displays ALL of the Custom Registration Fields… HOWEVER I would like to display ONLY selected Custom Registration Fields. Is there a way I can achieve this?

2/ Is there a way I can fetch ALL users Custom Registration Fields data to display for admin somewhere / export etc?

Thanks :slight_smile:

Hi,

1: In the settings of “custom profile fields” you will see a field to set which custom fields to be shown/used with some level of users. You can use this to show different fields to different users.

2: The Pro version have exporter tool. In the “Edit user” page you can see and edit all the fields.

Hope that helps :slight_smile:

Thanks for the feedback Krum.
Yes I have the pro version, and was also wondering if I could display different “custom profile fields” on different pages.
For example…
PAGE A
display the following:
c_p_field_1
c_p_field_2
c_p_field_3

PAGE B
display the following:
c_p_field_4
c_p_field_5
c_p_field_6

Are we able to somehow select which “custom profile fields” are to be displayed on which pages?
Perhaps also using the [s2Member-Profile /] shortcode (or possibly extending it)?

Thanks for your assistance! :smiley:

ok so I found that I can use the [s2Get/] and <?php get_user_field(); ?> functions to display selected custom profile fields HOWEVER it doesn’t allow the user to edit the custom profile fields like [s2Member-Profile /] does.
I really need to allow the user to edit some of the “custom profile fields” as we have created these fields for existing members to add information.

Any help is much appreciated :wink:
thanks

You can use a filter to ensure that specific fields are not displayed by the [s2Member-Profile /] shortcode, as explained here: https://s2member.com/kb-article/how-can-i-hide-specific-fields-on-the-s2member-profile-form/

If you then target each instance of your [s2Member-Profile /] shortcode using conditionals, you should then be able to get what you want. So something like this should work:

if ( is_page( 'page_a') ) {
     add_filter( 'ws_plugin__s2member_during_profile_during_fields_display_email', '__return_false' );
}
if  ( is_page( 'page_b') ) {
     add_filter( 'ws_plugin__s2member_during_profile_during_fields_display_username', '__return_false' );
}

Hmm, tried the conditionals as noted above by Tim Kaye however that doesn’t seem to be working either.
I have tried with the ‘is_page’ ID being the slug and also the DB post ID however still no sucess :expressionless:

Not sure why you’re talking about me in the third person, but you then mentioned “post ID”. So are these “pages” actually pages? If they are posts, you will need a different conditional.

lol sorry Tim, yes I did hit the ‘reply’ on your message! :smiley:
Yes they are ‘pages’ that I am working with. I was referencing the ‘post ID’ because pages still use the post ID.
Thanks

OK. Those filters work for me, so I wonder whether you have a theme or plugin conflict.

Hi David :slight_smile: How did you get to display custom registration fields to logged in users?