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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T01:11:39+00:00 2026-06-05T01:11:39+00:00

i need help in submit a form in which i have check email is

  • 0

i need help in submit a form in which i have check email is existing in the drop down ,while submit the form it show the alert message but also submit the form ,when no alert message shown then only form need to submit

$(document).on('click', '#Records', function (event) {
    $("#dropval select option:selected").each(function () {
        var z = $(this).val();
        //alert(z);
        if(z != 'email') {
            alert('please select Email');
            e.preventDefault();
            return false;
        } else {
            return true;
        }
    });
});
});

   <form  name="search" method="post" action="sample1.php" >
  <div id="dropval">

  <select name="select3[1]" class="mySelects" >
  <option value="None"  selected > None</option>
  <option value="email" >email</option>
  <option value="firstname" >firstname</option>
  <option value="lastname" >lastname</option>
  <option value="mobile" >mobile</option>
  </select>
  <select name="select3[2]" class="mySelects" >
  <option value="None" selected > None</option>
  <option value="email" >email</option>
  <option value="firstname" >firstname</option>
  <option value="lastname" >lastname</option>
  <option value="mobile" >mobile</option>
  </select>
  <select name="select3[3]" class="mySelects" >
  <option value="None" selected > None</option>
  <option value="email" >email</option>
  <option value="firstname" >firstname</option>
  <option value="lastname" >lastname</option>
  <option value="mobile" >mobile</option>
  </select>
  <select name="select3[4]" class="mySelect" >
  <option value="None"  selected> None</option>
  <option value="email" >email</option>
  <option value="firstname" >firstname</option>
  <option value="lastname" >lastname</option>
  <option value="mobile" >mobile</option>
  </select>
  </div>
  <input type="submit" value="submit" id="Records">
  </form>
  • 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-05T01:11:40+00:00Added an answer on June 5, 2026 at 1:11 am

    Try this:

    $('#formy').bind('submit', function(event){
        var success = false;
    
        $("#dropval select option:selected").each(function () {
            var z = $(this).val();
            if(z == 'email') {
                success = true;
            }
        });
    
        return success;
    });
    

    You were returning in the loop, this won’t do anything to the submit.

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

Sidebar

Related Questions

need help regarding USSD Gateway. I have to develop an app, which will directly
I have a HTML form which when submitted sends an email with all the
I need help with what I thought would be a simple form submit problem
I have this PHP contact form which disallows a submission from an existing IP.
i need a help. actually i have a html form as sown below. <form
I have a HTML page containing a form which consists of; text, check boxes
need help/guide for sql select query, I have 2 table stock and stock_history, in
need help in error in database pivot. i have table tamed table_score like below:
I have a very simple problem in which I need to do something after
I have a form, which at the moment is a simple HTML based one,

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.