Jump to content

Archived

This topic is now archived and is closed to further replies.

playaz

Show/Hide fields depending on user selection

Recommended Posts

Hi guys,

I am developing site in PHP/MySQL for an estate agent - During the sign up process when users enter details for their property I want the form to 'hide' fields that are not relevant depending upon what the user has selected in the form.

For instance, I have a form currently which includes all the property details - if a user selects his/her property as a 'Bungalow' in a drop-down menu, then I want to hide the drop-down menu below in the form for 'number of floors', as obviously a bungalow will only have a ground floor.

Can anyone suggest how this would be done using any techniques.

Feel free to ask me more questions if your unsure of what i'm trying to achieve.

Share this post


Link to post
Share on other sites
I have a form setup close to the idea your looking for But I have the form biuld as the chooses are made.

Mine build Inventory Part numbers as chooses are made options for the last choose are displayed.

They have to select the type of "Property" they wish and based on that what is displayed next.

for example I would have a if statement

if ($prop <> "Bungalow") {Display Select Number of floors} else {}


Share this post


Link to post
Share on other sites
take a look at this

http://www.phpfreaks.com/forums/index.php/topic,95771.msg383392.html#msg383392

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.