Hi there,
I have added an ACF group for ‘Users’ so there are more options for the User page.
I am now trying to create a ‘Registration’ page and need to know how I can update these fields when a user registers.
At the moment on my registration page I have the following:-
<div class="form-wrapper">
<form action="<?php echo site_url('wp-login.php?action=register', 'login_post') ?>" method="post">
<label>First name</label><input type="text" name="first_name" id="first_name" class="input" />
<label>Surname</label><input type="text" name="last_name" id="last_name" class="input" />
<input type="text" name="user_login" placeholder="Username" id="user_login" class="input" />
<input type="text" name="user_email" placeholder="E-Mail" id="user_email" class="input" />
<?php do_action('register_form'); ?>
<input class="btn btn-blue btn-blue-fixed" type="submit" value="Register" id="register" />
</form>
<?php else : echo '<h3>You are already logged in.</h3>'; endif; ?>
However, this only updates the username and email address. How do I get this to update other records such as the first name, last name and any other field I have added with ACF?
ACF5 Pro includes the ability to add field groups to the user registration form. https://www.advancedcustomfields.com/pro/.