Forum Moderators: coopster

Message Too Old, No Replies

Displaying new fields based on other input

         

RussellC

1:14 pm on Oct 7, 2004 (gmt 0)

10+ Year Member



Hi I am upgrading a customer management database and I am wondering if this is possible. I have a field for the type of lead (how the client found us). When entering a new client there will be a dropdown for the lead. If say "Partner" is selected I want another field to show up for "which partner" basically. At the same time, if another lead type is selected i want a different dropdown list to show up. Is this possible with php, or is this more of a javascript question? Currently it just has multiple fields that you only fill in if the $lead == "x".

Thanks for the help.

mincklerstraat

3:39 pm on Oct 7, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



If you want the box to show up on the same pageview, w/o a wizzard-like structure where you fill in the one box and click 'next', you're looking at a solution using both php/mysql and javascript. You can ask in #javascript how this would look generically, and then figure out how you'd fill in the info by doing a db query, maybe getting some help along the way in here.

Adrian2k4

12:49 am on Oct 8, 2004 (gmt 0)

10+ Year Member



you could ether do this with a wizard style script that generates the next form as mentioned.

OR

you could do something with div layers, css, and javascript/DOM to hide those fields you dont need and then show them with event handlers.