Anyone got any input on this?

This is a discussion on "Anyone got any input on this?" within the PHP Forum section. This forum, and the thread "Anyone got any input on this? are both part of the Program Your Website category.



Go Back   Webforumz.com > Main Forums > Program Your Website > PHP Forum

Notices


Reply
 
LinkBack Thread Tools
  #1 (permalink)  
Old May 8th, 2006, 11:33
Reputable Member
Join Date: May 2006
Location: Northampton, UK
Posts: 399
Thanks: 0
Thanked 0 Times in 0 Posts
Anyone got any input on this?

Hey guys i could really do witjh some help here.

I'm using the following code to create a php form that sits inside my webpage and sends the entered information to me as an e-mail.

Now, all of that works fine (website located here), However i could do with finding out if its possible to change some of the input methods to drop down menu's and radio buttons, for inputs such as date of birth and sex.

This is the code that is at the moment defining the input area:

<b>$your_sex:</b><br>\n
<input type=\"text\" size=\"35\" name=\"sex\"><br><br>\n

<b>$your_name:</b><br>\n
<input type=\"text\" size=\"35\" name=\"username\"><br><br>\n

<b>$your_middlename:</b><br>\n
<input type=\"text\" size=\"35\" name=\"middlename\"><br><br>\n

<b>$your_surname:</b><br>\n
<input type=\"text\" size=\"35\" name=\"surname\"><br><br>\n

As you can see there is a few fields there, (i have more on the site),

Now, ive tried replacing the "type" with radiobutton, like the html form tag uses, but this didnt work...(not supriising), and i could really do with a prod in the correct direction.

All and any help is massivly appreciated.. thankyou very much
Reply With Quote

  #2 (permalink)  
Old May 8th, 2006, 12:52
Most Reputable Member
Join Date: Aug 2005
Location: North Wales, United Kingdom
Age: 21
Posts: 1,093
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to sypher
Re: Anyone got any input on this?

Did you not do the original coding then?
Reply With Quote
  #3 (permalink)  
Old May 8th, 2006, 13:23
Reputable Member
Join Date: May 2006
Location: Northampton, UK
Posts: 399
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Anyone got any input on this?

No i didnt mate.

I'm new to php, and needed a functioning form quickly, the easiest way for me to learn and get something running was to use a free one, i believe its called : "Easy Mail Form" by a chap called Jasper Koops.

However, i could do with modifying it to better suit my needs.
Reply With Quote
  #4 (permalink)  
Old May 8th, 2006, 13:54
Reputable Member
Join Date: May 2006
Location: Northampton, UK
Posts: 399
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Anyone got any input on this?

the form im using can be downloaded from the following URL; http://easymailform.sourceforge.net/

Hope you can help me
Reply With Quote
  #5 (permalink)  
Old May 8th, 2006, 18:19
New Member
Join Date: Jul 2005
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Anyone got any input on this?

I believe the tag is just radio
Reply With Quote
  #6 (permalink)  
Old May 8th, 2006, 19:43
Most Reputable Member
Join Date: Apr 2006
Location: Cornwall, UK
Posts: 1,310
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Skype™ to ukgeoff
Re: Anyone got any input on this?

You need to Google up on some form tutorials otherwise someone here is going to be writing the code for you.

For radio button type inputs you need to be looking at using:

<input type='radio'...

For your drop down boxes, you need to code a combination of:

<select> and <option> elements.

BTW. This has nothing to do with php as such. It's straight html.

The fact that you may have chosen to use php to process the form data when submitted is a completely seperate issue.

Last edited by ukgeoff; May 8th, 2006 at 19:46.
Reply With Quote
  #7 (permalink)  
Old May 9th, 2006, 13:15
Reputable Member
Join Date: May 2006
Location: Northampton, UK
Posts: 399
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Anyone got any input on this?

thanks guys...

I figured out the correct syntax to create the radio buttons myself, and im looking at making the form process them now.

4 the record, i dont want anyone to write my code, i learn nothing that way... i do however appreciate honest good quality advice, and thank you all greatly.

I'm looking at driop down box's aswell.... but like you say its very html'y, except the html tag is "radiobutton" and i ended up using just "radio".

Grouping them and naming them correctly took some time but eventually i corrected the syntax and they work now.

The only other major part i need to do is make certian fields within the form reveal themselves as previous fields are filled in.... for example... i will have 6 fields for previous employment history.... but i dont want all 6 to show all the time.... when the fisrts it filled i want the second to show... when the second is filled i want the third to show... etc etc

Any input on a way to manage this?.... html?... java?. .. php? ...
Reply With Quote
  #8 (permalink)  
Old May 9th, 2006, 14:12
Most Reputable Member
Join Date: Apr 2006
Location: Cornwall, UK
Posts: 1,310
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Skype™ to ukgeoff
Re: Anyone got any input on this?

Quote:
Originally Posted by Accurax
when the fisrts it filled i want the second to show... when the second is filled i want the third to show... etc etc

Any input on a way to manage this?.... html?... java?. .. php? ...
You can manage this client side by using 'onblur'.

Initially hide the fields you don't want shown using css and 'display: none' of if you want to create the space on the form straight off but not actually show the fields, use 'visibility: hidden'.

Each of the fields will of course have a unique id.

Attach an onblur handler function to each of the fields and pass the id of the next field you want revealed.

Within the function, check that the field calling the function isn't empty and if it's not, reveal the next field by changing the styles to :

display: block or visibility: visible

depending on which method you used to start with.
Reply With Quote
Reply

Tags
input

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
help with form input gncreditcards Web Page Design 6 Jan 23rd, 2008 01:34
Input width PicoDeath Web Page Design 3 Jul 31st, 2007 16:03
Input Boxes Aaron1988 Web Page Design 30 Feb 1st, 2007 10:57
Input problem BGarner Web Page Design 2 Jan 23rd, 2007 16:11
User input DDxtreme95 JavaScript Forum 1 Dec 4th, 2005 00:36


All times are GMT. The time now is 11:37.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43