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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T10:18:43+00:00 2026-06-08T10:18:43+00:00

I am building a form which will be used to enter the result of

  • 0

I am building a form which will be used to enter the result of a student into a school database. Now the school has 2 sections for the 5th till 8th standard and 1 for the 9th till 10th.

Here is what i want to do, there should be a select box where the user can select the standard for which he wants to enter data, if the selected standard is within the limit of 5th to 8th then another select box needs to be dynamically added which will have the option to select “Section A” or “Section B”. If the user selects 9th or 10th grade then no section select box should be there.

  • 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-08T10:18:45+00:00Added an answer on June 8, 2026 at 10:18 am

    Welcome to StackOverflow.

    Since you haven’t shown any of your html markup or attempts at writing the JavaScript for yourself I’ll just give you a bare-bones jQuery solution and leave it to you to match up to your actual html.

    In my opinion the easiest way is to implement your requirement is to include both select elements in the html markup and just hide and show the second one as applicable. (Not only is this easier than dynamically adding and removing the element, it has the added advantage of leaving your form accessible for the occasional user who has JavaScript disabled.)

    $(document).ready(function() {
        var $section = $("#section").hide();
        $("#standard").change(function() {
            var val = +$(this).val();
            if (val >= 5 && val <= 8)  // assume option elements have value="5", etc.
                $section.show();
            else
                $section.hide();
        });
    });
    

    Further reading: http://api.jquery.com/

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

Sidebar

Related Questions

I'm building a contact form (PHP file, design has been already made) which will
I am building an app which requires saving a form whenever user enter the
Having a treeview control on a form which will be used to visually represent
In a form that I'm building, I have textareas which will include a nice
I am building a form which uses labels to define the input values (as
I'm building a price estimator form, which uses jQuery to manipulate select menus. Basically,
I'm building a form for searching a database inside my application, and I only
I am building a form using a js+html and I ran into a problem.
I'm building a login form composite component. The page that uses it will pass
I'm building an index of data, which will entail storing lots of triplets in

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.