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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T07:15:52+00:00 2026-05-20T07:15:52+00:00

Trying to serialize a form with recaptcha in the form. Here is how I

  • 0

Trying to serialize a form with recaptcha in the form.

Here is how I serialize my form:

var serializedform = $('form.af').serialize();

Here is my form example:

<form class = 'af'>
    <input name='name' id = 'name'>
    <input name='lastname' id = 'lastname'>
        <div id = 'recaptchadiv'>
            <input name='recaptcha_response_field' id = 'recaptcha_response_field'>
            <input name='recaptcha_challenge_field' id = 'recaptcha_challenge_field'>
            <noscript>
                <input name='recaptcha_response_field' id = 'recaptcha_response_field'>
                <input name='recaptcha_challenge_field' id = 'recaptcha_challenge_field'>
            </noscript>
        </div>
    <button name = 'submit'>
</form>

problem comes from recaptcha noscript block injected by recaptcha automatically.
That block contains a copy of recaptcha_response_field and recaptcha_challenge_field.

So – when I serialize this form – values from noscript block inputs overwrite real recaptcha_response_field and recaptcha_challenge_field values.

Is there a way to serialize a form using jquery while skipping noscript block?

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-05-20T07:15:52+00:00Added an answer on May 20, 2026 at 7:15 am

    You could use jQuery to remove the <noscript> tags before the form is serialized – clearly, they aren’t necessary by that point. Something like this:

    var $form = $('form.af');
    $form.find('noscript').remove();
    var serializedform = $form.serialize();
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Im trying to get a form element value using closest. Here some example code.
I'm trying to serialize some contents inside of a form: <form> <input ...> <input
I'm trying to serialize a custom class that needs to use multiple elements of
i have this form: <form name=myForm action=#> <input type=text name=firstField /> <input type=text name=secondField
I'm trying to pass a variable to a hidden form input upon click of
i'm trying to serialize a form by the id but it won't serialize and
I'm trying to submit a form with AJAX through jQuery: $('.submit input').click(function() {return false;});
I'm trying to serialize a form and exclude certain elements. but nothing is working.
I'm trying to serialize the main class in my VB solution. I've added the
I am trying to use this piece of code to serialize a form AND

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.