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

  • Home
  • SEARCH
  • 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 6723425
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T09:34:02+00:00 2026-05-26T09:34:02+00:00

I have a query i hope you can help with, i have searched but

  • 0

I have a query i hope you can help with, i have searched but cant find an answer to my exact question.

I have a drop down (select) menu that depending on selection needs to show 2 extra fields
Every other question I have seen depends on different selections showing different fields.

<select  id="idhere" name="namehere" title="Mortgage Type">

<option value="First Time Buyer">First Time Buyer</option> 
<option value="Moving Home">Moving Home</option>
<option value="Remortgage">Remortgage</option>
<option value="Buy To Let Purchase">Buy To Let Purchase</option>
<option value="Buy To Let Remortgage">Buy To Let Remortgage</option>
</select>

The following need to show 2 extra form fields (held within a div below)

First Time Buyer
Moving Home
Buy To Let Purchase

These both do not need to show the extra fields

Remortgage
Buy To Let Remortgage

Finally The Extra Fields are:

<p>Have You Found A Property</p>
<input  id="foundpropery" type="checkbox" value="0" />
<br />
<br />

<p>Have You Made An Offer</p>
<input  id="foundproperty" type="checkbox" value="0" />

Using javascript? How do i show the extra fields depending on selection

In advance thanks for any help!

  • 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-26T09:34:02+00:00Added an answer on May 26, 2026 at 9:34 am

    I think this can be a starting point for what you’re trying to do, you use the div’s “display” property to show/hide it depending on what’s selected in the dropdown:

    <html>
    <head>
    <script type="text/javascript">
    function toggle() {
    var e = document.getElementById("selectList");
    var strMortgageType = e.options[e.selectedIndex].value;
    var divToHide1 = document.getElementById("foundproperty");
    var divToHide2 = document.getElementById("madeoffer");
    if(strMortgageType == "Remortgage" || strMortgageType == "BuyToLetRemortgage")
    {
    divToHide1.style.display = "none";
    divToHide2.style.display = "none";
    }
    else
    {
    divToHide1.style.display = "block";
    divToHide2.style.display = "block";
    }
    } 
    </script>
    </head>
    <body>
    <select  id="selectList" name="namehere" title="Mortgage Type" onchange="toggle()">
    <option value="FirstTimeBuyer">First Time Buyer</option> 
    <option value="MovingHome">Moving Home</option>
    <option value="Remortgage">Remortgage</option>
    <option value="BuyToLetPurchase">Buy To Let Purchase</option>
    <option value="BuyToLetRemortgage">Buy To Let Remortgage</option>
    </select>
    <div id="foundproperty">
    <p>Have You Found A Property</p>
    <input  id="foundpropery" type="checkbox" value="0" />
    <br />
    <br />
    </div>
    <div id="madeoffer">
    <p>Have You Made An Offer</p>
    <input  id="madeofferInput" type="checkbox" value="0" />
    </div>
    </body>
    </html>
    

    If you’re using jquery, this post may be helpful:

    Jquery : If select has option 1 show div

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

Sidebar

Related Questions

I suspect this is a trivial query but hope someone can help me with
I have Kohana ORM/Mysql query problem. I hope you can help. To start of,
I hope someone can help me out. I have a table that logs our
I hope someone can help with this please. I am trying to query an
I hope somebody can help me here, I have a table that has the
hope you can help me with something: I'm executing an fql query to read
I am really stuck with an sql query... I hope someone can help shed
I hope someone can help me with my MySQL problem. I have a bug
I hope someone can help, I've been trawling SO for hours and can't find
I hope you can help me. I have a string like the following Luke

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.