Support

Account

Home Forums General Issues Adding fields that can be answered from Loggin Users

Solving

Adding fields that can be answered from Loggin Users

  • Hi,
    i’m not sure if ACF supports what i’m looking for.
    I want that Users which are logged in on my community side (with buddy press) can set more informations about themself.
    So i need fields that can be filled out from the users in the frontend.

    Example: User is logged in on his account, there is a new “BuddyPress User Profile Tabs” called Holiday…and on this Tab there should be more Fields that can be filled out from the User like…Favorite Country, Which countrys i already visited..

    Is it possible to use ACF for this issue?
    Should i create a field group called holiday and then the Fields Favorite Country and Countrys you visited and show them in the post with a shortcode?

    Thanks a lot.

    Dennis

  • You can remove fields for users not logged in
    https://www.advancedcustomfields.com/resources/acf-prepare_field/

    
    add_filter('acf/prepare_field/key=field_XXXXXXX', 'only_for_logged_in_users');
    only_for_logged_in_users($field) {
      if (is_user_logged_in()) {
        return $field;
      }
      return false;
    }
    
  • Hi John,

    Thanks vor your reply. My Problem is not the loggin in topic.
    My Problem is That i try generelly try to Unterstand how i have to use ACF.

    Do i always have to use a Code Skipped Which i paste somewhere in? Or can i just create any fieldtype and use a shortcode to display the field?

    I want that users on their buddypress profile can answer to custom fields like „what is your favorite country? Or can choose an counrty Form a selectionlist.

    Can i work With shortcodes? Vor Exempel…[acf field="ChooseCounrty"] Or do i have to copy codesnippeds somewhere in?

    Dennis

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.

We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Cookie Policy. If you continue to use this site, you consent to our use of cookies.