Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8058757
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T09:27:09+00:00 2026-06-05T09:27:09+00:00

Via WordPress, I have built a form with a successful AJAX response. The fields

  • 0

Via WordPress, I have built a form with a successful AJAX response. The fields are empty in the database though! I’m guessing it’s because I’m not serializing my values:

// JavaScript Document
jQuery(document).ready(function($){
    jQuery('#newFeedbackForm').submit(function(){
        var topic = $('#topic').val();
        var name = $('#name').val();
        var email = $('#email').val();
        var no_results_feedback = $('#no_results_feedback').val();

        var post_data = {
            action: 'addFeedback',
            topic: topic,
            name: name,
            email: email,
            no_results_feedback: no_results_feedback
        };

        $.post(av_feedback_vars.ajaxurl, post_data, function(response){
                        if(response == 'success'){
                            $('#feedback').text('Thank you for your comment.');
                        }else{
                            alert(av_feedback_vars.error_message);
                        }
        });
        return false;
    });
});

How would I use serialize in this case? Thanks for helping a noob (first time at ajax here)

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-05T09:27:10+00:00Added an answer on June 5, 2026 at 9:27 am

    As you can see on http://api.jquery.com/jQuery.post/ data doesn’t have to be serialized. jQuery will format it correctly.

    Are you sure all the form data is there? You should inspect a working, non-ajax request and see what post data is sent to find out what to send with ajax (and then inspect that request too).

    Chrome Dev tools and Firebug are perfect for ‘request inspecting’. Apparently so are IE Dev tools, but I wouldn’t know †

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a page within wordpress that I want to password protect via a
I have a problem with a WordPress site that is not reading the meta
I am looking to use wordpress editor via the front end. i have looked
I have WordPress instances with each in its own database. For an update I
This is the mark-up I have to work with, The form is created via
I have a website based on Wordpress, built with pages. I need to have:
Im using Wordpress, Im also creating posts via XMLRPC based on an RSS feed
I'm using a wordpress backend on my site and displaying the articles via my
I'm pulling data into a UITableView via an XML feed from a Wordpress site.
So, I am implementing twitter via twitter widget pro into a wordpress theme. I'm

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.