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.
|
|
|
|
|
![]() |
||
Anyone got any input on this?
|
||
| Notices |
![]() |
|
|
LinkBack | Thread Tools |
|
|||
|
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 ![]() |
|
|
|
|||
|
Re: Anyone got any input on this?
Did you not do the original coding then?
|
|
|||
|
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. |
|
|||
|
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 |
|
|||
|
Re: Anyone got any input on this?
I believe the tag is just radio
|
|
|||
|
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. |
|
|||
|
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? ... |
|
|||
|
Re: Anyone got any input on this?
Quote:
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. |
![]() |
| Tags |
| input |
| Thread Tools | |
|
|
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 |