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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T19:42:03+00:00 2026-05-31T19:42:03+00:00

I have to quickly make a form that has optional menus depending on the

  • 0

I have to quickly make a form that has optional menus depending on the value of other fields. I couldn’t find anything in plain HTML on that. Is that possible to do with only HTML?

  • 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-31T19:42:04+00:00Added an answer on May 31, 2026 at 7:42 pm

    Plain HTML probably isn’t up to the task (unless there are new dynamic features in HTML5 with which I am unaware, which is entirely possible). But with JavaScript (especially when using jQuery), it’s pretty trivial to show/hide/change form elements and page sections dynamically based on the state of the form.

    What you would do is attach event listeners to the form elements which drive the dynamic content, and those listeners would show/hide/change page elements accordingly. You can take a look at a contrived example here:

    HTML:

    <div id="firstSection">
        <select id="selectSomething">
            <option>Select...</option>
            <option>One</option>
            <option>Two</option>
        </select>
    </div>
    <div id="optionalSection">
        <select id="selectSomethingElse">
            <option>Select...</option>
            <option>Three</option>
            <option>Four</option>
        </select>
    </div>
    

    CSS:

    #optionalSection
    {
        display: none;
    }
    

    JavaScript:

    $('#selectSomething').change(function() {
        if ($('#selectSomething').val() == 'Two') {
            $('#optionalSection').show();
        } else {
            $('#optionalSection').hide();
        }
    });
    

    Essentially the second section is conditionally displayed depending on what’s currently selected in the first section.

    Note that, from the server’s perspective, all of the form elements would still post their values. This method doesn’t prevent the second section from being included in the form, only from being shown to the user. When handling the form results on the server-side you’d still want to re-validate the business logic accordingly. (Never assume valid content from a user.)

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

Sidebar

Related Questions

I have a form on a simple web page that has a series of
I have a problem drawing something quickly in .NET. I don't think that any
I have noticed that my particular instance of Trac is not running quickly and
I have 10 small images that have to be shown quickly one after another
We have a couple of very very slow JUnit tests that make heavy use
I have some code that runs fairly well, but I would like to make
I have a table that defines the possible categories in my website - fields
I have a form bean named SearchForm that I use to display search results.
Does python have any way to easily and quickly make CLI utilities without lots
I have quickly read (and will read with more care soon) the article of

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.