Web Design Forums

Welcome! Please register or log in: Forgot your password? Why register?
You are here: Web Design Forums » Web Design Help » HTML and CSS Help » Cascading Form RSS

Cascading Form

This thread was started by Jrwhar and has been viewed 297 times, and contains 7 replies, with the last reply made by Baniboy.
Post Reply
1
View Jrwhar's reputation
Jrwhar, WDF Noob Private message  
Posted February 4 '10 at 12:13 PM
      Posts: 5
Basically I need a form that has two drop down boxes and they second chanes based on the first, and depending on the second either a checkbox or another form comes up. Seeing as how Im a beginner and Im lerning as I go along, I wound up getting completely lost. If anyone has any advice or can point me to a tutorial it would be very very much appreciated!!!

Advertisement Register for free to hide these ads and participate in discussions!

2
1 points at 100%
Posted February 4 '10 at 12:52 PM
      Posts: 40
You need to get familiar with javascript to be able to do this.

3
View Jrwhar's reputation
Jrwhar, WDF Noob Private message  
Posted February 4 '10 at 01:32 PM
      Posts: 5
I have some javascript in there I was looking for something more specific. Ill post up what I have so far.If you could help me out it would be greatly appreciated.
Attachments File Type: html form.html (4.9 KB, 4 views)

4
View Jrwhar's reputation
Jrwhar, WDF Noob Private message  
Posted February 4 '10 at 01:59 PM
      Posts: 5
Wow actually just pointing out that it was javascript helped me out alot. Before I was just searching cascading dropdown which didnt really help me at all cuz I kept getting stuck. Thank you. p.s. any additional or specific ino would still e really helpful

5
1 points at 100%
Posted February 4 '10 at 02:06 PM
      Posts: 40
Hide the second selection menu using display: none; and then have javascript change the selection menu to display: block; based on the value of the first menu.

So make selection menus for all of the variations you want. Then have javascript enable visibility one at a time based on the value of the first selection menu.

Another thing you might want to try is to fit them all in one selection menu. Just give sub-selections a padding and use labels as those "hardware" and "software" selections.

That's how I would do it.

6
View Jrwhar's reputation
Jrwhar, WDF Noob Private message  
Posted February 4 '10 at 02:09 PM
      Posts: 5
Wow thank you so much Ill get to work on it.

7
View Jrwhar's reputation
Jrwhar, WDF Noob Private message  
Posted February 4 '10 at 02:33 PM
      Posts: 5
How do I make javascript enable visibility based on a previous selection.

8
1 points at 100%
Posted February 4 '10 at 02:39 PM
      Posts: 40
if(*selection menu value condition here*)
      {
        document.getElementById(element).style.display = 'block';
      }
That should be enough to change visibility. For getting form input value you could take example of many javascript form validators.

Post Reply

Similar Threads
Thread Thread Starter Forum Replies Last Post
Form mail: User defines recipient in form UNarmed PHP 8 January 29 '10 10:44 AM
Quick contact form question - help please :) emmaburge PHP 2 October 21 '09 07:02 PM
ASP form not working Ella ASP and .NET 16 January 15 '08 12:27 AM
My mail form causes "Page has Expired" in IE TheGardener PHP 2 March 24 '07 04:04 PM
Help! Form POST to another page PLUS js control. MEGAginge Javascript, AJAX, and JSON 0 September 21 '05 07:43 PM