Support

Account

Home Forums Front-end Issues How do display data from a group of fields without front end to logged-in users?

Solved

How do display data from a group of fields without front end to logged-in users?

  • I wrote the code below, but the field group data is not returned, can you help me?

    <meta charset="<?php bloginfo('charset') ?>" />
    <?php /* Template Name: Página Inicial  */ ?>
    <?php get_header(); ?>
    <?php if ( is_user_logged_in() || current_user_can('cliente') ) { ?>
    <?php global $current_user;
          get_currentuserinfo();
    
          echo 'Username: ' . $current_user->user_login . "\n";
          echo 'User email: ' . $current_user->user_email . "\n";
          echo 'User level: ' . $current_user->user_level . "\n";
          echo 'User first name: ' . $current_user->user_firstname . "\n";
          echo 'User last name: ' . $current_user->user_lastname . "\n";
          echo 'User display name: ' . $current_user->display_name . "\n";
          echo 'User ID: ' . $current_user->ID . "\n";
    ?>
    <?php acf_form(array(
    'field_groups' => array('key' => 'group_59078808ab504',),
    'updated_message' => __("Dados salvos com sucesso! Muito obrigado!", 'acf'),
    'submit_value'	=> 'Salvar dados'
    )); ?>
    
    <?php } else { 
    echo 'Conteúdo para usuários registrados'; }  ?>
        
    <?php get_footer(); ?>
    
  • The “group of fields” is displayed whitout data =(

  • 
    <?php acf_form(array(
    'post_id' => 'user_'.$current_user->ID, // set the post id to show
    'field_groups' => array('key' => 'group_59078808ab504',),
    'updated_message' => __("Dados salvos com sucesso! Muito obrigado!", 'acf'),
    'submit_value'	=> 'Salvar dados'
    )); ?>
    
  • Excellent very good indeed Thanks a lot for the help solved my problem.

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

The topic ‘How do display data from a group of fields without front end to logged-in users?’ is closed to new replies.