dynamic form fields that will be hidden/visible based on previous answers

Discussion in 'HTML & Website Design' started by imvitaliy, Jan 15, 2008.

  1. #1
    I am creating a Form and want to create dynamic form fields that will be hidden/visible based on previous answers. For example.

    I am making a "get a quote" form where I have to 1st ask people:

    Where do you want the floorcovering services done.
    [ ] Basement
    [ ] 1st Floor
    [ ] 2nd Floor

    and then if a user checks the on lets say 1st floor checkbox, it will dynamically show more options to choose from.
    [ ] Basement
    [ x ] 1st Floor
    -> What room? [ ] Bathroom [ ] Living room [ ] Kitchen [ ] Dining Room
    [] 2nd Floor

    and then if a user selects Bathroom and Kitchen it would look like this:
    [] Basement
    [ X ] 1st Floor
    -> What rooms? [ x ] Bathroom [ ] Living room [ x ] Kitchen [ ] Dining Room
    -->Bathroom jobs needed done: [ x ]Shower [ x ]Walls [ ]Half-wall
    -->Kitchen jobs needed doen: [ x ]Floor [ ]walls [ ]Half-wall
    [ ] 2nd Floor

    [SUBMIT]

    Then when I get a form sent it only gives me a teable with items that were checkmarked so it would look like this.

    1st Floor
    Bathroom: Shower, Walls
    Kitchen: Floor
     
    imvitaliy, Jan 15, 2008 IP