[ad_1]
Sorry. Also, I have a custom field for image upload, but I cannot see this image in the user profile.
Hello,
Thanks for the feedback!
1. WordPress requires both a username & an email on front-end user registration and in back-end, when an admin manually create a user. However with ACF Extended Form, the only requried field is an email. In fact, if there is no username submitted, the ACFE Form will automatically use the e-mail as username.
2. In order to login a user after the form submission, you can use the acfe/form/submit/user hook (See documentation) and programatically log the user using native WP functions. Usage example:
add_action('acfe/form/submit/user/form=my-form', 'my_form_submit', 10, 5);
function my_form_submit($user_id, $type, $args, $form, $action){
// log user after user registration
wp_clear_auth_cookie();
wp_set_current_user($user_id);
wp_set_auth_cookie($user_id);
}Note that a setting will be added in the Form UI in a future update in order to do it from the UI.
3. You can use the “Redirect Action” in order to redirect the form after submission (See documentation).
In that action, like in other Actions in the UI, you can use Template Tags in order to render dynamic values from previous actions (See documentation). For example, if you want to redirect the form on the “User Action” author page, you can set the Redirect URL setting to: {action:user:permalink}. You can also render the User ID with {action:user:ID} if you prefer, like this: /my-success-page?user_id={action:user:ID}
4. In order to upload an Image Field you’ll have to check the said field in the “Save ACF Fields”. See screenshot.
Hope it helps!
Have a nice day!
Regards.
