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
- Limit the number of inactive widgets
- How to correctly submit a search form and display the result in an independent page
- Custom plugin: Trying to show saved data on frontend
- 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
- Inserting Gravity Form checkbox values into Advanced Custom Fields [closed]
- How to handle a custom form in wordpress to submit to another page?
- Editor role cannot save custom theme options
- On update to 3.04 site started recording accents as “á” and “á”, what to do?
- Submitting form via admin-post.php and handling errors
- 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`
- Using Multiple Submit buttons to trigger customised php functions
- How do I let users upload files to a chosen location?
- 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?
- Custom Form Processing Issue
- 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
- Custom search results page not working with empty search
- Modify HTML structure of fields in woocommerce checkout form
- Input data from email form not going to JSON file
- Styling my own password protected page, how to deal with wrong password?
- 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
- Databases – Submitting data from inputs to database [closed]
- how to update and display an option without reloading the page
- db converts decimal number wrong
- WordPress admin-ajax.php 400 bad request
- Ajax contact form return 0
- Filtering a Database Query
- Search WordPress using static html page
- WP_OPTIONS table, active_plugins entry [closed]
- How to put a form with php code into a variable or shortcode?
- What is the alternative code to if (isset ($_POST) && !empty ($_POST) to avoid warnings?
- Shortcode to embed Edit Account form not working
- Capture form data in one function and use it in another function (same file)
- How to show every second user different types of banners?
- How to display success message correctly and delete it when the page is refreshed
- Using admin-post.php for admin form but it directs me to admin-post.php white screen
- Submitting a form, using Ajax, to run a SQL Select query based on user input from the form
- Adding Additional Variables on Menus Page
- form built dynamically with php, not submitting
- Search only working on front page (index) , not working on other pages
- WPDB secure custom form
- Adding attribute to the post.php form tag in wp-admin
- How to make blog post entries appear as input form instead of just text?
- Front end file upload returning wrong attachment url
- WordPressUser Submission Form
- Get value from db for custom contact form
- What should I write in the post action of this front end post form?
- Custom forms with HTML
- Contact form – problem with displaying message about sent mail
- HTML Form Question
- WordPress Custom Form – Getting Query Vars, Weird Glitch?
- Set all WooCommerce Products to Simple, Virtual & Downloadable
- Form from within a page
- How to make a pagination with dropdown selection?
- Updating user meta adds string count to value?
- I want to retrieve the email or username data entered for password reset, but failed. how can I do it?
- wordpress contact form messages not sending although it saying they were sent successfully with this php code
- How to create a widget with a populated dropdown?
- Store user form submitted information in post type
- Using a PHP form, get the page title or any other element in the sent e-mail
- form submission reverts to index.php template
- Javascript / PHP – closing the loop
- Updating the database after parsing CSV document
- Creating wordpress user registration form
- Adding action item to admin users table and sending email
- Passing link parameter values to form
- Processing forms with php to wordpress database
- Trying to display user meta by “name” – not by “ID”
- Styling admin page rows in order of importance (checkboxes)
- Display default WordPress login/registration form into a modal window
- Save Option on Database
- Force string into signup form
- Data inserted in database, but ajax calls error function
- upload images on front by user using form
- ajax form function error
- Send foreach $_post method to contact form 7 [closed]
- Integrating CSS Into a WP Function Call [closed]
- Options.php loop won’t show!
- Use HTML Form Data in PHP Function – WordPress Admin Page
- Contact form with dynamic dropdown and filter
- Custom form that stores data in mysql database
- Putting form result in my database
- Bulk data save in custom table