If the page is manually refreshed then the right content shows up, it’s so weird!
I am pretty sure this is the problem, and its not that weird.
If you update with AJAX (in your case with jQuery/Javascript) the generated page– the page in the browser– is not going to reflect any changes unless your Javascript instructs the page to change. It isn’t automatic. Your Javascript is working up to the point that your data is being saved, but it is not finishing the job by updating the DOM to reflect the changes, or there is an error in the script that is preventing the update. It is hard to say. The important code, the Javascript, you didn’t post so it isn’t possible to push you along the right path any further than that.
Related Posts:
- Implement a multi-value input field where the number of entries is not limited
- How to fix ‘Notice: Undefined index:’ in PHP form action
- How to get WordPress Time Zone setting?
- Limit the number of inactive widgets
- How to stop form resubmission on page refresh
- How to correctly submit a search form and display the result in an independent page
- Custom plugin: Trying to show saved data on frontend
- add_filter the_content str_replace after shortcode
- Genesis – Customize search form
- Metabox repeating fields – radio buttons not saving correctly
- Remove/unset options field from backend Settings->General?
- Site Title and Tagline in Theme Options Page
- How to exclude pages from the search results
- How to insert PHP code in a WordPress Post
- Inserting Gravity Form checkbox values into Advanced Custom Fields [closed]
- How to handle a custom form in wordpress to submit to another page?
- Has anyone tried putting PHP ActiveRecord on WordPress?
- Editor role cannot save custom theme options
- WordPress customizer: load controls in a custom div
- Handling error states with admin_post
- Site Title and Tagline in Pagelines DMS Options Panel
- Enqueue Javascript Correctly for 3.5
- Creating wordpress user registration form
- Creating a WordPress form with a PHP script and default header
- On update to 3.04 site started recording accents as “á” and “á”, what to do?
- submit the form to same page
- Passing array in add_option()
- Submitting form via admin-post.php and handling errors
- Select dropdown not showing selected value php
- Custom WordPress+PHP+MYSQL+AJAX form, submit event not captured by Javascript, but does POST data to the DB
- Passing POST data from one WP post to another
- How do I output a database option that is an array into a get_posts array?
- Delete option value from array using update_option()
- Getting the dropdown menu to redirect to different pages?
- Processing a subscription form with POST method?
- How to get bool with `get_option()` when already registered setting with type `boolean`
- How to group 2 radio buttons in a widget?
- Ajax form submit within a Post Metabox
- is it possible to force wordpress to always save thumbnails as ‘jpg’ not ‘png’
- How to create and work with custom data / tables (i.e., for arbitrary data)?
- Settings API – sanitize_callback is not called and it leads to an incorrect behavior
- Store and Work with huge array in WP [closed]
- Upload Image in a WordPress page using PHP
- Using Multiple Submit buttons to trigger customised php functions
- Get Admin Email Address From External PHP page
- Adding Custom Forms
- How do I let users upload files to a chosen location?
- SQL QUERY – Select a value directly from the database
- woocommerce registration form with klaviyo(don’t work with current user)
- Adding Default Settings to Theme My Login plugin
- How to add values to media “whitelist_options” in wp-admin/options.php template?
- How to create a form and display its content as table in admin panel?
- Custom Form Processing Issue
- My form action url is being prepended with a directory that does not exists
- Ajax – Call to undefined function get_option()
- Multiple options not staying selected after saving
- Custom profile field with birthday. Troubles with
- How can I reuse the code to capture a param in a URL and place in a value in a hidden form?
- WooCommerce/WordPress: how hide entire table form after submit (Admin Dashboard)?
- How to store data from multiple forms using ajax and php
- How to use $query->set with post__in?
- Ajax loaded form replaces form action with Ajax url
- prevent default not stopping page refresh. Passing form information to and from php with ajax in a wordpress site
- How to limit the number of forgot password reset attempts in WordPress?
- Custom search results page not working with empty search
- Modify HTML structure of fields in woocommerce checkout form
- Whitelisting items from custom options page
- Post + form + action + results on the same page
- Options API get_option() and update_option() Not Correctly Updating or Returning
- Ajax call return 404
- How to pre populate a form field with a link of a current user’s author profile?
- Why Won’t My Inputs in a form with a Get method work together?
- Setting default category base on theme activation
- Input data from email form not going to JSON file
- How to get the value of input hidden html from text editor to custom page template?
- Show success or error messages in Ajax response to WordPress custom registration form
- Styling my own password protected page, how to deal with wrong password?
- Contact form won’t submit
- wp_mail file attachment not being placed in upload folder?
- Search Query: how to construct a search string from two select elements?
- Login to wordpress by clicking a link and specifying usernaname and password in url
- Error: options page not found
- How to store options in an array
- Databases – Submitting data from inputs to database [closed]
- how to update and display an option without reloading the page
- How to show a ‘correct’ message after submit a form?
- db converts decimal number wrong
- Form Security: nonce vs. jQuery
- Saving plugin settings – ERROR: options page not found
- WordPress admin-ajax.php 400 bad request
- Security for data obtained from the database
- Ajax contact form return 0
- Pull GetOption() variable into jQuery dynamically created html
- Filtering a Database Query
- Trying do build a contact form
- “operation successful” message
- User register hook is not working in woocomerce register form
- Search WordPress using static html page
- How to execute html code inside php?
- Is a series of update_option calls safe, performance wise?