Perhaps you could either use admin ajax or the WP REST API to send a request to the server for the user meta update.
If you have a look at the WP documentation (links above) or similar questions here on WPSE, you can find examples on how to do it.
- Update user meta with ajax https://wordpress.stackexchange.com/search?q=Update+user+meta+ajax
- Update user meta with rest api https://wordpress.stackexchange.com/search?q=Update+user+meta+via+REST+API%3F
Related Posts:
- Custom WordPress+PHP+MYSQL+AJAX form, submit event not captured by Javascript, but does POST data to the DB
- How to pre populate a form field with a link of a current user’s author profile?
- Submitting a form, using Ajax, to run a SQL Select query based on user input from the form
- Testing a Form’s Zipcode Field with Regular Expressions to Determine WordPress Page Behaviour
- Using Ajax to submit a form, and run a SQL Select query based on user input from the form
- Cascading dropdown select search based on Parent Page & Child Page
- How to correctly submit a search form and display the result in an independent page
- Add a class to links in the visual editor (how to get old dialog back)
- Metabox repeating fields – radio buttons not saving correctly
- Gutenberg Blocks doesn’t render correctly when using do_blocks
- How to handle a custom form in wordpress to submit to another page?
- Get post meta in enqueued js file
- How to use WordPress (PHP) functions in AngularJS partials files?
- How to create a custom config file and get data using inline JS in a wordpress page
- Archive dropdown styling not applied
- Getting the dropdown menu to redirect to different pages?
- using woocommerce_template_single_add_to_cart in shop-loop – javascript issues [closed]
- Use WordPress’s Media Uploader/ Manager in non WordPress php application
- Get/Set wp.customize.previewer.previewUrl
- How to make custom total price reactive in navigation
- Adding tawk.to code just before body tag on functions.php file
- How can I output a php value into a JS file within WordPress?
- How do I let users upload files to a chosen location?
- How to test nonce with AJAX – Plugin development
- Slider loading issue
- Creating a Multi-Level Associative Object Using AJAX
- remove wp floating submenu in wp dashboard
- search and replace preword from author
- How to complete two other input fields, completed the first
- Modify HTML structure of fields in woocommerce checkout form
- Need Help Fixing My Iframes [closed]
- wp_enqueue_scripts leads to error
- Open post-content in archive page in a Modal box with bootstrap
- Creating own shortcode – echoeing php variable based on JS variable
- How to add a do_action on refreshing of WP customizer?
- PhantomJS with wordpress
- Styling my own password protected page, how to deal with wrong password?
- Add / Update Custom Fields After Select Pictures in Media Window
- Login to wordpress by clicking a link and specifying usernaname and password in url
- Generate sidebar depending on height of post
- How to add specific meta tags to head of cart and checkout pages in woocommerce?
- Error – ‘create_function is deprecated’ [closed]
- How to execute html code inside php?
- trouble with page_id & highlighting current page
- wordpress admin plugin menu custom css
- Load Posts on Click via Ajax into a DIV
- What is the alternative code to if (isset ($_POST) && !empty ($_POST) to avoid warnings?
- After adding my website to a new server, I keep getting a unexpected end of file error, but the file is identitcal to it’s original source
- Why i can’t get custom fields value or post ID via Ajax?
- Cannot access $wpdb, comes back NULL
- How to reference PHP in Javascript
- get db values for external js file
- Adding Additional Variables on Menus Page
- form $_post action value gets truncated after it passes through two forms
- Accessing an API with jQuery and AJAX
- Ajaxurl suddenly not defined
- What should I write in the post action of this front end post form?
- Contact form – problem with displaying message about sent mail
- html form: redirect page after form completes submit function and posts data
- Creating a brand attribute as a variable
- WordPress Custom Form – Getting Query Vars, Weird Glitch?
- Cannot find the php_ini configuration file to find my error log to see why my code is not working
- Add other class content with reference class value
- Form from within a page
- How do I integrate vanilla Javascript to a wordpress website?
- I want to retrieve the email or username data entered for password reset, but failed. how can I do it?
- WordPress Slider is not working
- form submission reverts to index.php template
- wordpress dependent dropdownlist using post type is not working
- How to echo a PHP code into WooCommerce variation product?
- Creating a WordPress addon for ContactForm7 submission (.XML file export)
- Custom Post type Ajax search results
- include javascript Multiple files in wordpress through script.js
- Ajax wordpress function showing source code in alert and not value of input field?
- Full search and replace isn’t enough to make all pictures to be loaded with https
- I want url from a file in media using title file
- make an array in wordpress cusmization api?
- Find the method which AJAX GET calls
- Retrieve $_POST data to send to javascript without using localize script
- Add a downloaded JS file to WordPress
- How to call javascript function (jquery) in a shortcode?
- Passed variable gets undefined variable error on insert on next page
- How to set up an auto delete post?
- Querying latitude and longitude into google maps correctly
- Trying to display user meta by “name” – not by “ID”
- Trouble using wordpress functions in a pop-up modal form
- custom contact form no longer working (because of 3.2?)
- js code not stored in database currectly
- Correct Syntax for uploading files to custom directory in WordPress
- how can I make content from a plugin hidden when user is logged in? [duplicate]
- php inside HTML via shortcode? [closed]
- Passing javascript variable to php file
- Javascript code not working – $ is not a function error
- Slick slider not working on wordpress
- Show Login Errors In WordPress/Elementor (Code “works”, but breaks site)
- Start a long running PHP process via JS/Ajax and monitor progress on admin page
- JQuery UI Autocomplete showing as bullets
- Help with commenting system
- Add Imports to Existing WordPress Import Map
- Hide or Show Read More Button by Content Area