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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T14:09:12+00:00 2026-06-03T14:09:12+00:00

I have a popup div containing a form that when closed i would like

  • 0

I have a popup div containing a form that when closed i would like the form to reset the errors and the fields within the form. I was planning on resetting the form in the disablePopup function. Other things to note is that it is a django project and i am using ajax to submit the form.

here is the code so far:

function disablePopup($contact_selector){
    //disables popup only if it is enabled
    if(popupStatus==1){
        $("#backgroundPopup").fadeOut("fast");
        $contact_selector.fadeOut("fast");
        popupStatus = 0;
    }
}

so basically I would like to extend this code to allow me to reset a form within the contact_selector

any ideas would be much appreciated

thank you

katie

edit:
I think what is happening is that my django errorlist is appearing in the html and is separate from the form validation. What I would like to do is initialize a new form to my django project when i close the div – not just reset the form i have. that way when the open the form again the data is clean with no leftovers from their last entries

  • 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-03T14:09:14+00:00Added an answer on June 3, 2026 at 2:09 pm

    i ended up using the following code:

    $("#backgroundPopup").click(function(){  
    disablePopup($('.popup'));  
        var validator = $("#createrecipeform").validate();
        validator.resetForm();
        console.log(validator);
        $('#createrecipeform').each (function(){
      this.reset();
      });
        $('.errorlist').empty();
    }); 
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Hey i have this div that shows as a popup: <div class=popup> </div> Then
i have a html page sth.html containing <div id=recoverpass> <h2>Recover Password</h2> <form action=# method=post
I have a div that I want to write to a popup window (for
I have a popup div that I need to load a bunch of different
i have a css popup div that when it loads through the onClick it
I have a link button inside UpdatePanel in a div popup. On Button_Click, I
I have a popup search box that is shown when the user mouses over
I have a popup menu that has a few items in it. Option 1
I have a Popup defined like this: <Popup Name=myPopup StaysOpen=True Placement=Bottom PlacementRectangle=0,20,0,20 PlacementTarget={Binding ElementName=myPopupAnchor}>
I have a popup function in a program that works well, be re-loads the

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.