Form Change

General discussions related to php

Moderators: macek, egami, gesf

jonnyphp
New php-forum User
New php-forum User
Posts: 6
Joined: Tue Jun 05, 2012 7:31 am

Form Change

Postby jonnyphp » Wed Aug 08, 2012 5:52 am

Hi,

I am wanting to create a dropdown box that when which ever item is selected changes the rest of the form to something more meaningful.

E.G:

Dropdown consists of option1: Cars, Option2: Planes, Option3: Trains

So when user selects Cars, they get a form to fill in relevent to car information and changes for planes etc. Have tried searching the web but quite new to PHP so not sure what this method is called to search as were only getting back junk.

Any help would be greatly appreciated.

thanks in advance.

User avatar
freshnet
php-forum Active User
php-forum Active User
Posts: 285
Joined: Tue Feb 22, 2011 8:19 am
Location: Canada

Re: Form Change

Postby freshnet » Fri Aug 10, 2012 5:00 am

Since you're changing the form before it's submitted, you will want to use jquery / javascript here instead of PHP. I'd suggest looking at the jquery html function http://api.jquery.com/html/


Return to “PHP General”

Who is online

Users browsing this forum: No registered users and 1 guest