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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T19:07:19+00:00 2026-06-03T19:07:19+00:00

My question is, how can I not display a form on a page by

  • 0

My question is, how can I not display a form on a page by default?
For example, I have a proxy with options, and the thing is, I do not want to display the options by default, but I want to have a link to the options form. If you don’t get what I mean, here is the page which I’m working on: proxy with options.

Also, here is the code I have on the page currently:

<form action="includes/process.php?action=update" method="post" onsubmit="return updateLocation(this);" class="form">
        <input type="text" name="u" id="input" size="40" class="textbox">
        <input type="submit" value="Go" class="button"> &nbsp; [<a style="cursor:pointer;" onclick="document.getElementById('options').style.display=(document.getElementById('options').style.display=='none'?'':'none')">options</a>]
        <ul id="options">
            <?php foreach ($toShow as $option) echo '<li><input type="checkbox" name="'.$option['name'].'" id="'.$option['name'].'"'.$option['checked'].'><label for="'.$option['name'].'" class="tooltip" onmouseover="tooltip(\''.$option['escaped_desc'].'\')" onmouseout="exit();">'.$option['title'].'</label></li>';?>
        </ul>
        <br style="clear: both;">
    </form>
    <div class="navigation">
        <!--[glype:error]--> 
    <?php ## Display error messge if applicable
if ( isset($_SESSION['msg']) ) {
    echo '<div id="error">',$_SESSION['msg'],'</div>';
    unset($_SESSION['msg']);
} ?>

Edit: Also, is there any way I could align the checkboxes with the text?

  • 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-03T19:07:21+00:00Added an answer on June 3, 2026 at 7:07 pm

    You could put the form inside a <div> with the style attribute display:none then change that display:block when you need to show the form.

    Edit: Now that the code has been formatted correctly I can expand on this further. You need to simply have a style on your option ul as display:none. This will mean the options are not visible by default.

    If the user made an error AND they had picked an option, I imagine you would want to show the options by default? If so create a variable called $show_options which is false by default but true if any of the options had been picked on submit. Then in your html for the options box use this code:

    <ul id="options" style="<?php echo (($show_options)?(''):('display:none')); ?>">

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

Sidebar

Related Questions

I have not been able to find any definitive answers to this question: Can
I think this is a simple question, but I can not find the answer
The question below is not really a programming question, but more of how can
my question is the following How can I display a standard rss page after
how to display error onto another page? I have a form under user folder
can I have a question about how to redirect the page after user invite
I can not really find a satisfying answer to the following question: What would
My question is not clear at title [i can not write it exactly] e.g
My question is, why I can not use hide() & show() to hide/show table
im not sure if i say it right. my question is how can i

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.