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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T04:58:23+00:00 2026-06-04T04:58:23+00:00

I have a search form through which users can, well, perform searches. When the

  • 0

I have a search form through which users can, well, perform searches. When the “advanced search” checkbox is checked, a new part of the form shows, allowing for full customisation of the search. For a multitude of reasons, I have decided to send the form using the “get” method, thus displaying all variables in the url.

Problem is, when submitting a non-advanced search, the variables from the advanced part are still sent using the get method, making for a lengthy URL when it is not needed, as the advanced variables aren’t used by the PHP that handles the search.

To hide the advanced form when the “advanced search” checkbox isn’t checked, I’ve put the advanced form in a div of its own and have JavaScript set its style.display to “none” when the checkbox isn’t checked, and have it reset to default when it is.

How would I best go about submitting only part of the form when “advanced search” isn’t checked? A form within a form, removing and re-writing the div’s content instead of simply hiding it, or what? Or is there an easy trick to this nobody’s told me about?

Thanks!

  • 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-04T04:58:25+00:00Added an answer on June 4, 2026 at 4:58 am

    you should probably use the attribute

    <input disabled="disabled" ..
    

    on the input fields when you do not want to submit them

    you can find more information in this article

    you will probably need to keep your “display:none” as the rendering of disabled elements depends on the browser.

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

Sidebar

Related Questions

(Using MySQL and PHP) I have a search form that will allow my users
i have a form in which if the user enters the search query, its
I am trying to make it easy form my end users to search through
Lets say we have a web page with a search input form, which submits
I have a search form on which I have the following INPUT field <input
I have a search form with min and max fields. It queries a MySQL
I have a simple search form with a box and a button. <form action
what I have: a google search form (displayed on all pages) a wordpress page
How do you add Search form to your Views in Drupal? Do I have
I'm making a simple search form in rails. In my search view I have

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.