Home Forums General Issues User profile meta fields in front-end profile edit page


User profile meta fields in front-end profile edit page

  • Hello!
    First – thanks for this beautiful plugin.

    Brief overview – I need to add multiple custom fields to user profile and then automatically display all fields in user edit page in front-end.

    So the first thing I did correctly and inserted multiple fields to users, now I have to show them in user profile edit page in front-end and I have to automatically get all fields.

    I could do this manually with PHP and add the fields (one by one hardcoded) to user profile edit page in front-end and then updated them, but the problem is that if Admin would change some fields in panel (remove/edit name etc) they wont update/change automatically, I would have to change the code to display them right.

    So I need to get somehow all fields from user with some loop, function etc. I dont know, but for example in back-end user edit page they are populated automatically so there must be a way how I can do it in front-end. Do anyone know how to do this?

    Hope someone understood me and could help.

  • Just found that with this function I can get all fields from field group –

    <?php acf_form_head(); ?>
    <?php get_header(); ?>
      <div id="primary" class="content-area">
        <div id="content" class="site-content" role="main">
          <?php /* The loop */ ?>
          <?php while ( have_posts() ) : the_post(); ?>
            <?php acf_form(array(
              'field_groups' => array(327),
            )); ?>
          <?php endwhile; ?>
        </div><!-- #content -->
      </div><!-- #primary -->
    <?php get_sidebar(); ?>
    <?php get_footer(); ?>

    But the problem is that fields isn’t filled in with logged in user info, all inputs are empty. Is there any way to connect it to user profile so it will show up user fields and they can update them?

  • Just wound the answer here –

    Anyway, thanks guys for this incredible plugin, wish you all the best

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

You must be logged in to reply to this topic.