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
- 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
- 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
- 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?
- Add Div to Comment Form
- WordPress custom login page
- 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
- How to change popular term checklist title when edit post?
- Add a date updated/date modified option using custom fields
- How to add textarea field to taxonomy (tag)?
- How to add an extra button on woocommerce shop page and use it to send the product info with image in a mail? [closed]
- Change the Labels of Users to Customers in Admin
- Woocomerce custom billing address fields display in order details [closed]
- Custom search to display results within same page
- How Can I Move Data From Form 1 To Form 2
- Add Custom API Call to WP-Login.php
- Auto login from custom registration form
- Deep customization of wp-login.php
- Users can only view their content from the front end
- List top 5 authors with most posts
- What requirements for ACF custom fields key and name properties?
- Multi-site User Sessions
- Custom Login Process
- A truely custom login page?
- Problem with custom user meta field
- “operation successful” message
- Toggle custom fields?
- 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
- How to auto add nofollow to links in custom field?
- How to create a custom WordPress front page
- Custom Form not generating URL
- 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
- Trying to update Woocommerce meta values
- How can Use custom input field in functions.php page?
- 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
- Replace publish date in blog module with custom field
- Custom dropdown search form that allows users to select option B based from Option 1
- How to add H1 Tag on Homepage?
- Add commentmeta custom field to every published comment with SQL
- Highlight specific user with custom field value
- 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
- Changing starting number of User ID
- Two searchforms with different categories/posts per page
- Page template with custom html fields inside a content
- User registration add user ID?
- Create users via PHP
- Save And Display Mp3 Audio files on WooCommerce product page with Dokan
- Advice how to connect custom database with WordPress, change data in WordPress and finaly use this data
- Is it possible assign a secondary existing role to already existing one?
- User Query Multiple Orderby Clause
- Some data of one custom user profile is erased when I update another custom user profile
- Add custom information in editor summary