I am assuming you are using third party forms, if yes
Then you have to use Javascript and PHP.
You can paste this code in shortcode or you have to use hooks, as you are learning please go through this Link
PHP CODE
if ( is_user_logged_in() )
{
$current_user = wp_get_current_user();
$email = $current_user->user_email
}
See the documentation for wp_get_current_user()
Now as you have $email you can save that $email to JavaScript something like this
<script>var email = <?PHP echo $email ?></script>
Now using this var you can populate these user details to the form.
If you face any issue let me know.
Related Posts:
- how to make a custom field readonly or disabled by user role?
- Use wp_login_form function to login with a custom user table?
- How to update the delete user confirmation form?
- Custom ReCaptcha Login
- Creating my own Admin Forms in a WordPress CMS?
- How to override wp-login.php
- How to remove Profile Picture section or the message “You can change your profile picture on Gravatar.”
- Modify custom Users Manage page
- How to Save Different Usermeta Fields According to User Role?
- Add field to posts (checkbox) that only one post can have
- generate unique number when registering a user
- How to get value from custom backend menu
- Adding Properties to User Profile and Displaying in List
- Allow Users to Set Password During Registration
- Custom protected password page with ACF
- Set user loggin status?
- Community and User Generated Content Website: Have been thinking about Drupal but leaning on WordPress heavily
- How can I add data to a custom column in the Users section of the wordpress backend?
- Passing page url into a custom field via the Press-This bookmarklet
- Using transients to store captchas
- How to extend nav-menu-item-control data in Appearance > Customize?
- Custom column sorting in WordPress admin post table
- Unique User Account Number + Displayed Via Shortcode
- Custom Login and Registration form in Ajax
- Last time a user logged in
- Hide custom field if empty
- Updating Custom WordPress User Meta Field via REST API
- How to pass external variables to the wp_new_user_notification_email filter?
- How can I allow access to multiple users, using the same login, at the same time?
- How to implement a custom password field that redirects to another page upon correct password?
- Creating user relationships
- Add Div to Comment Form
- WordPress custom login page
- Query posts by category AND custom field, then ORDERBY another custom field – help!
- list/consult Taxonomy only for the respective author/creator in dashbboard
- Auto redirect after session expire, but only for one user
- Function to allow “Anyone can register”?
- Make custom user table column filterable
- Advanced Custom Fields: Sorting custom columns with custom fields sorts only by date
- Add ‘Creator’ User Meta when adding user
- Properly customizing login/register form
- Follow me for WordPress blogs (multi-authors)
- Adding custom field in all widgets, but at the top of the form, in admin area
- Custom Login Process
- A truely custom login page?
- Problem with custom user meta field
- “operation successful” message
- How to insert a writing panel between the title and the page content?
- Toggle custom fields?
- Customizing Users in Admin Area
- How to print Array values of custom Fields Meta?
- Saving contact form 7 data into custom Table
- Get users based on month ACF datepicker field
- What is the best way to modify Admin Panel on WordPress?
- How to make wordpress use a non-wordpress users table?
- Woocommerce custom checkout form
- Front end register with custom fields
- theme customizer – can a single option pass multiple values?
- Custom login and registration forms
- Let author add field to metabox by pressing a button
- How to auto add nofollow to links in custom field?
- How to create a custom WordPress front page
- Custom Form not generating URL
- Save custom field types with this function…?
- Personalized Gallery what are my options?
- how or where wordress collect unlogged user session
- Is it possible to add custom badges to product attributes conditionally, based on custom field?
- How do I make Dynamic Student Admission Form?
- Open login logo URL in new tab
- How to get Previous Visited Page Information
- WordPress category custom title
- How to create multipage form and redirect to specific URL based on inpput?
- Trying to update Woocommerce meta values
- How can Use custom input field in functions.php page?
- Simple custom attributes on posts
- Use a custom page with dynamic content as a user profile page
- How do I add a dropdown menu to a form?
- Query Product categories what have a custom field
- Invitation link to a site in multisite network does not work?
- Adding a drop-down (select tag) option under Menu Settings in WordPress Admin
- WP_User_Query Search Multiple Keywords from a Multi-Select Field?
- Custom password set/reset link in same URL format as default does’t work
- How to automatically pull an information from a form field onto an other page?
- Replace publish date in blog module with custom field
- How to submit form data in the same page in WordPress without reloading the page?
- Custom dropdown search form that allows users to select option B based from Option 1
- How do I enable the text editer in my WordPress theme? [closed]
- How to display all post from the same current usermeta
- How to add H1 Tag on Homepage?
- Add commentmeta custom field to every published comment with SQL
- Highlight specific user with custom field value
- Change the default WordPress image on the dashboard login to a custom image [duplicate]
- Does WordPress support template resources/custom fields
- Change post template the proper way
- How to get name and email value from a custom form and add it to campaign monitor subscriber list?
- Change the functionality of wordpress users module in admin
- Custom user fields validation on registration
- Changing starting number of User ID
- Two searchforms with different categories/posts per page
- add unique code required to register