Results 1 to 5 of 5

Thread: Form fields visable or hidden depending on check box

  1. #1
    Join Date
    Sep 2007
    Posts
    83
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Form fields visable or hidden depending on check box

    is there a way to hide multible fields in a form i.e. text, drop downs, and check boxes Then by checking a check box they show up.

  2. #2
    Join Date
    Jul 2006
    Location
    Antwerp, Belgium (Europe)
    Posts
    927
    Thanks
    121
    Thanked 2 Times in 2 Posts

  3. #3
    Join Date
    Jul 2006
    Location
    just north of Boston, MA
    Posts
    1,806
    Thanks
    13
    Thanked 72 Times in 72 Posts

  4. #4
    Join Date
    Jul 2006
    Location
    Antwerp, Belgium (Europe)
    Posts
    927
    Thanks
    121
    Thanked 2 Times in 2 Posts

  5. #5
    Join Date
    Sep 2007
    Posts
    83
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Chechu
    That looks like it would work, but Im a DS I guess ive stripped it down to something simpler for me to figure out and I still dont get it heres what I got in short because really theres more to the form but tried to make it simple for this, I stripped the DD form down tring to just get the 1 check box and the one it reveles, but the window one has to be there for some reason or the ssl isnt hidden. Any way can you help me get it to work with my stripped down form?
    HTML Code:
    <html>
    
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
    <title>New Page 1</title>
    <script src="FormManager.js">
    /****************************************************
    * Form Dependency Manager- By Twey- http://www.twey.co.uk
    * Visit Dynamic Drive for this script and more: http://www.dynamicdrive.com
    ****************************************************/
    </script>
    <script type="text/javascript">
    window.onload = function() {
        setupDependencies('weboptions','entryform'); //name of form(s). Seperate each with a comma (ie: 'weboptions', 'myotherform' )
      };
    </script>
    </head>
    
    <body>
    
    <form action name="weboptions">
    	<p><label>Linux<input type="checkbox" name="os" value="linux"></label>
    	<label>Windows<input type="radio" name="os" value="windows"></label>
    	<input type="hidden" class="DEPENDS ON os BEING linux"><label>SSH<input type="checkbox" name="ssh" class="DEPENDS ON os BEING linux"></label>
    	</p>
    </form>
    <p>&nbsp;</p>
    <form enctype="multipart/form-data" action="form.php" method="post" name="entryform">
    	<div align="center">
    		<table width="150">
    			<tr>
    				<td width="144"><label>Agree<input type="checkbox" name="AgreeToTerms" value="I Agree To Rules and Conditions"></label>
    				</td>
    			</tr>
    			<tr>
    				<td width="144"><label>Buggy<input type="checkbox" name="EighthScaleBuggy" value="Eighth Scale Buggy" class="DEPENDS ON AgreeToTerms BEING I Agree To Rules and Conditions"></label></td>
    			</tr>
    			<tr>
    				<td width="144"><label>Freq <select name="Frequency1Buggy">
    				</label>
    				<option></option>
    				<option value="Spectrum">Spectrum</option>
    				<option value="26.995 Brown">26.995 Brown</option>
    				<option value="27.045 Red">27.045 Red</option>
    				</select></td>
    			</tr>
    			<tr>
    				<td width="144"><label>Trans
    				<input type="text" name="TransponderBuggy" size="7" maxlength="7"></label></td>
    			</tr>
    		</table>
    	</div>
    </form>
    
    </body>
    
    </html>

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •