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 7891237
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T06:34:02+00:00 2026-06-03T06:34:02+00:00

I use the .serialize() function to make a key -> value pair string for

  • 0

I use the .serialize() function to make a key -> value pair string for updating a database using an HTML form. Recently I have been wanting to omit one of the input fields from the data string. I thought that the .not() function should work, but it doesn’t (as far as the way I am using it here).. Please see the fiddle for an example of the problem. http://jsfiddle.net/9RbZ4/

In this example, there are four fields, with names a, b, c and d. I wish to omit the field with name=”a” from the serialize function. How should I do that? Please note I wish to reference the name attribute of the element.

How do I do this?

Thanks!

  • 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-03T06:34:04+00:00Added an answer on June 3, 2026 at 6:34 am

    This does look a little odd as you would expect the not to filter out bits you don’t want.

    however you are selecting the form itself rather than the inputs, this is why it cannot filter.

    $('form *[name]').not('[name="a"]').serialize();
    

    should do the trick.

    NB – I use *[name] as you may have elements other than input involved…

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

Sidebar

Related Questions

i insert in database values (array) with use function serialize() , how can echo
i'm using jquery tabs.. i'm use tabs-1 as input form and tabs-2 as show
I want to make a form that uses jQuery's ajax function to submit the
I am using the jQuery Form Plugin with my Rails app. I have a
Signalling Protocols make frequent use of Enumerated types which have well defined integer values.
I have this ajax jquery code: var form = document.getElementById('frm'); var data_string = form.serialize();
Can anyone tell me what happened to the Html.Serialize function mentioned in the url
I have some objects that I wish to cache on disk. I use serialize()
How do I save elements positions in a div? Do i use serialize and
I use C# code more-or-less like this to serialize an object to XML: XmlSerializer

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.