SitePoint Sponsor

User Tag List

Results 1 to 6 of 6
  1. #1
    SitePoint Zealot allanlud's Avatar
    Join Date
    Jul 2012
    Location
    Meath, Ireland
    Posts
    120
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Generate Form with Dropwdown

    Hi all.

    What I'm trying to do (but don't really have much of an idea how) is generate a form when one out of two options in a dropdown is selected.

    Let's say I have a form with one field - a dropdown - with 2 options. When option A is selected a form will appear below and when option B is selected a different form will appear below.

    Can anyone point me in the right direction on this?

    Thanks.
    Al.

  2. #2
    It's all Geek to me silver trophybronze trophy
    ralph.m's Avatar
    Join Date
    Mar 2009
    Location
    Melbourne, AU
    Posts
    24,177
    Mentioned
    454 Post(s)
    Tagged
    8 Thread(s)
    If you don't want to code this yourself, you could head over to a site like Wufoo, which generates the code you need for something like this. (It's not free, though.)

  3. #3
    SitePoint Wizard bronze trophy PicnicTutorials's Avatar
    Join Date
    Dec 2007
    Location
    Carlsbad, California, United States
    Posts
    3,656
    Mentioned
    15 Post(s)
    Tagged
    0 Thread(s)
    Here is one way using label and input alone. http://www.websitecodetutorials.com/...-accordion.php. But your talking about using option and select I gather. That I have not done and therefore don't know how. I would guess that would not be possible with CSS alone. A more conventional drop down would be doable though I'm sure. But with click functionality like above would be tricky. Almost anything these days can be down though. If you don't like the above option I'm sure someone could show you a click type drop down with CSS only.

  4. #4
    SitePoint Zealot allanlud's Avatar
    Join Date
    Jul 2012
    Location
    Meath, Ireland
    Posts
    120
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks for those replies guys.

    @ralph - a non payment option would suit better but I'll give that a look anyway, thanks

    @picnic - thanks for that but I think it needs to be a bit different than that, we are using a similar accordion menu on a different page of the site but not on any forms

    I have a friend that is a back-end developer so will give him a shout and see if he knows of anything.

  5. #5
    SitePoint Wizard bronze trophy PicnicTutorials's Avatar
    Join Date
    Dec 2007
    Location
    Carlsbad, California, United States
    Posts
    3,656
    Mentioned
    15 Post(s)
    Tagged
    0 Thread(s)
    Quick google brings up this. http://addyosmani.com/blog/formbox/. Searching "jquery drop down form" brings up a few options it seems. Basically just put jquery in front of any search and you get lots of options.

  6. #6
    SitePoint Zealot allanlud's Avatar
    Join Date
    Jul 2012
    Location
    Meath, Ireland
    Posts
    120
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I did have a look earlier but couldn't find a whole lot, then got swamped with some other work.

    I am using Gravity Forms on a Wordpress site I partially built and the function of Gravity Forms is pretty much what I need, but on a smaller scale.


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
  •