Jump to content


Show/Hide fields depending on user selection

  • Please log in to reply
2 replies to this topic

#1 playaz

  • Members
  • PipPipPip
  • Advanced Member
  • 55 posts

Posted 11 July 2006 - 01:36 PM

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.

#2 jvrothjr

  • Members
  • PipPipPip
  • Advanced Member
  • 300 posts
  • LocationOhio

Posted 11 July 2006 - 02:20 PM

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 {}

If you understand everything you know nothing!


#3 nogray

  • Members
  • PipPipPip
  • Advanced Member
  • 930 posts
  • LocationSan Francisco CA

Posted 11 July 2006 - 03:50 PM

take a look at this



0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users