creating forms based on radio button selections

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • sluster
    New Member
    • Aug 2006
    • 6

    creating forms based on radio button selections

    I've got a section of a website that I currently use to perform a search for users. My boss wants that section to have the option of being 1 of 3 different searches (search our webpage; search our catalog; search using this webtool we use). What I'd like to do is essentially an If/ElseIF (or Case/Select if you prefer) idea based on the user selecting one of 3 choices from the radio buttons (so if they click the "search web page" button all of a sudden the search fields change and it uses the block of code I've written to search the web site), but I have no idea how to do this in an HTML/PHP environment. I've created all 3 searches without too much trouble but making them change which is going based on the button choice confuses me.

    thanks for your time
  • bevort
    New Member
    • Jul 2006
    • 53

    #2
    Originally posted by sluster
    I've got a section of a website that I currently use to perform a search for users. My boss wants that section to have the option of being 1 of 3 different searches (search our webpage; search our catalog; search using this webtool we use). What I'd like to do is essentially an If/ElseIF (or Case/Select if you prefer) idea based on the user selecting one of 3 choices from the radio buttons (so if they click the "search web page" button all of a sudden the search fields change and it uses the block of code I've written to search the web site), but I have no idea how to do this in an HTML/PHP environment. I've created all 3 searches without too much trouble but making them change which is going based on the button choice confuses me.

    thanks for your time

    If you realy want to do it "all of a sudden" You have to use Javascript.
    use on each button or Radio input an onClick or onChange event to hide and show fields

    Comment

    Working...