Advertisement

There's no such thing as a stupid question, but they're the easiest to answer.
Login
Search

Advertisement

Web Design & Development Web Design & Development
Search Search
Search for:
Tech Support Guy > > >

PHP Field Visibility Help


(!)

KSL's Avatar
KSL KSL is offline
Computer Specs
Junior Member with 6 posts.
THREAD STARTER
 
Join Date: Apr 2008
Experience: Intermediate
01-May-2008, 02:38 AM #1
PHP Field Visibility Help
I have put a contact us form on my website which uses PHP to send the forms results in an email. Now I did not write the code myself I found it on a freeware website. The code works great and sends the form perfectly it even has a simple form of Captcha. Now my problem is I want to tweak the code but I donít know how.

My current form has a number of Text boxes and a number of drop down selection boxes. What I want to do is make a text field invisible until someone selects an option in the selection box.

To elaborate I am SEOing the website and I want a "Where did you find us" Selection box and if someone selects Google I want a new text box to display asking what search term they used.

I would be grateful for some help.


KSL
TheRobatron's Avatar
TheRobatron TheRobatron is offline
Computer Specs
Senior Member with 551 posts.
 
Join Date: Oct 2007
Location: England
Experience: Intermediate
05-May-2008, 05:12 AM #2
You'll need some Javascript on the selection box:
HTML Code:
<select>
<option value='google' onSelect='document.getElementById('googleSearch').visible = true'>google</option>
</select>
<input type='text' name='googleSearch' visible='false'/>
That should make the googleSearch box invisible until the person selects 'Google' from the drop down list.
KSL's Avatar
KSL KSL is offline
Computer Specs
Junior Member with 6 posts.
THREAD STARTER
 
Join Date: Apr 2008
Experience: Intermediate
05-May-2008, 06:13 AM #3
Thanks worked a treat
As Seen On

BBC, Reader's Digest, PC Magazine, Today Show, Money Magazine
WELCOME TO TECH SUPPORT GUY!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.


(clock)
THIS THREAD HAS EXPIRED.
Are you having the same problem? We have volunteers ready to answer your question, but first you'll have to join for free. Need help getting started? Check out our Welcome Guide.

Search Tech Support Guy

Find the solution to your
computer problem!




Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools


WELCOME
You Are Using: Server ID
Trusted Website Back to the Top ↑