Online Forms

Boys love the Toys ... Discuss the latest toys, technologies, Virus Alerts, Help others with Home Improvements or fixin the car, etc.

Moderator: Referees

Post Reply
User avatar
greengirl88
Superstar
Posts: 2250
Joined: Wed Oct 22, 2003 7:07 pm
Favourite Team: Saskatchewan Roughriders
Location: Bombers territory
Contact:

Online Forms

Post by greengirl88 » Sun May 20, 2007 10:39 pm

Hey! I just became a website administrator for my student group's website, and I have to edit the application form. Does anyone know anything about making an online form, or where I can find a reliable source of information about this? Thanks!
"It's time for plan B."
"We have a plan B?"
"No, but it's time for one."
-- Stargate SG-1

User avatar
Inquiring Mind
Hall of Famer
Posts: 6576
Joined: Sat Jul 03, 2004 1:24 pm

Post by Inquiring Mind » Sun May 20, 2007 10:48 pm

Depends on the format of the form. If it's a .pdf, Adobe Acrobat.... if it's html, asp, php, you can do it via notepad if you have a fair knowledge of coding, if not, a program like Dreamweaver is great for that.
-

Look. We can go round and round about this all the live long day. Let's keep it simple. I embody amazement. Can you dig on that? Good. Then meet me on the corner of rock and roll, and bring a flask of something that burns.

User avatar
greengirl88
Superstar
Posts: 2250
Joined: Wed Oct 22, 2003 7:07 pm
Favourite Team: Saskatchewan Roughriders
Location: Bombers territory
Contact:

Post by greengirl88 » Sun May 20, 2007 11:01 pm

I'm doing it with php. I should have been more specific, I do have Dreamweaver and I'm editing it there, but the previous webmaster confused me. I can easily set up the page, but my biggest problem is, once someone hits the "submit" button, how does all of that information get translated and how does it get where it's going? I thought I understood, until the previous webmaster started talking about how complex the database work would be, to do some of the things I wanted to do.
"It's time for plan B."
"We have a plan B?"
"No, but it's time for one."
-- Stargate SG-1

User avatar
Catssuck
Champion
Posts: 3850
Joined: Tue Nov 23, 2004 1:19 pm
Favourite Team: Toronto Argonauts
Location: Oakville(Home)/Chandos Lake(Cottage)
Contact:

Post by Catssuck » Mon May 21, 2007 5:03 am

<form name="formName" action="processingPage.php" method="post">

This is the beginning form tag - Name is simply that - whatever you want to call the form.
Action is the page that will be receiving the form variables and handling them.
Method is the way the variables are passed to the processing form.

With method you can use either 'post' or 'get'. I always use 'post' because it hides the variables you are passing. Get mimicks passing them through the URL (e.g) 'processPage.php?id=idVariable&name=nameVariable' with get the URL looks like 'processPage.php'

On the processPage.php you put the code to handle the form. Depending on what form elements you used and what you called them.

Back to the form now.
Say you had two elements an input box and a select box.
First Name:<input type='text' name='firstName'>
Select Gender: <select name='gender'>
<option value='male'>Male</option>
<option value='female'>Female</option>
</select>

The 'text' type creates an input box - you can define certain properties in the tag itself but I like to control these by using css - that way you can set font type, weight, size, background colour as well as length, maximum input etc.. yourself.

The 'select' is a drop down box with choices - These are easier to handle than radio buttons (especially when validating forms). The select is given a name but the options are what determine the value.

Finally you will need the submit button - you can use a standard submit or create a button - if you create a button then use the image and the input type is no longer 'submit' but 'image'. When the browser sees an image as an input type it knows it is a submit button.

<input type='submit' name='submitButton' value='Submit Form'>
Once again 'type' is the type of element you are using. In this case it is a submit button (if I said image I would add the 'src' property to tell the form what the source of the image is - like you do with image tags and it would automatically be a submit button). Name is the name of the element and Value is the words that appear on the button (if you are using an image then you don't need this property).

So now when the submit buton is clicked the 2 form elements variables (firstName and gender) are posted to processPage.php.

On processPage.php you should have a way to receive the variables.
$name=$_POST['firstName'];
$gender=$_POST['gender'];
if you used the methos 'Get' in the form then you would replace the $_POST with $_GET. I actually use $_REQUEST on most of my forms because it can handle both 'post' and 'get'.
Now you have the variable on the processPage.php page and you can do whatever with them.

This is a basic form, if you are adding attachments then there is more involved. You should also have form validation using javascript and the onClick or onSubmit event and if statements to verify that the person has reached the processPage.php page via the form, not in error. If you need any more info just pm me.
On July 13th 2007 Cossack wrote: I agree with the Argo fan.
Thanks for finally coming around Terry - the Ticats do suck.

BBBob
Hall of Famer
Posts: 9040
Joined: Sat Nov 30, 2002 9:17 am

Post by BBBob » Mon May 21, 2007 9:30 am

If you have Dreamweaver then you can create a new form with ease!

Best of luck!

:beer:

User avatar
D
2017 MVP
2017 MVP
Posts: 9550
Joined: Thu Oct 24, 2002 11:19 am
Favourite Team: British Columbia Lions
Location: Van
Contact:

Post by D » Mon May 21, 2007 9:45 am

I own The Grey Cup! .com

User avatar
greycupgarry
2017 MVP
2017 MVP
Posts: 18242
Joined: Thu Nov 06, 2003 6:15 am
Location: Sect. 217 Fav. Teams: Argos, Leafs, Stamps, Flames, Patriots, Browns, Storm, Holland
Contact:

Post by greycupgarry » Tue May 22, 2007 8:22 am

Catssuck wrote:<form name="formName" action="processingPage.php" method="post">

This is the beginning form tag - Name is simply that - whatever you want to call the form.
Action is the page that will be receiving the form variables and handling them.
Method is the way the variables are passed to the processing form.

With method you can use either 'post' or 'get'. I always use 'post' because it hides the variables you are passing. Get mimicks passing them through the URL (e.g) 'processPage.php?id=idVariable&name=nameVariable' with get the URL looks like 'processPage.php'

On the processPage.php you put the code to handle the form. Depending on what form elements you used and what you called them.

Back to the form now.
Say you had two elements an input box and a select box.
First Name:<input type='text' name='firstName'>
Select Gender: <select name='gender'>
<option value='male'>Male</option>
<option value='female'>Female</option>
</select>

The 'text' type creates an input box - you can define certain properties in the tag itself but I like to control these by using css - that way you can set font type, weight, size, background colour as well as length, maximum input etc.. yourself.

The 'select' is a drop down box with choices - These are easier to handle than radio buttons (especially when validating forms). The select is given a name but the options are what determine the value.

Finally you will need the submit button - you can use a standard submit or create a button - if you create a button then use the image and the input type is no longer 'submit' but 'image'. When the browser sees an image as an input type it knows it is a submit button.

<input type='submit' name='submitButton' value='Submit Form'>
Once again 'type' is the type of element you are using. In this case it is a submit button (if I said image I would add the 'src' property to tell the form what the source of the image is - like you do with image tags and it would automatically be a submit button). Name is the name of the element and Value is the words that appear on the button (if you are using an image then you don't need this property).

So now when the submit buton is clicked the 2 form elements variables (firstName and gender) are posted to processPage.php.

On processPage.php you should have a way to receive the variables.
$name=$_POST['firstName'];
$gender=$_POST['gender'];
if you used the methos 'Get' in the form then you would replace the $_POST with $_GET. I actually use $_REQUEST on most of my forms because it can handle both 'post' and 'get'.
Now you have the variable on the processPage.php page and you can do whatever with them.

This is a basic form, if you are adding attachments then there is more involved. You should also have form validation using javascript and the onClick or onSubmit event and if statements to verify that the person has reached the processPage.php page via the form, not in error. If you need any more info just pm me.
:o

Image
if you have noticed this notice you will have noticed that this notice is not worth noticing

User avatar
ArgoDave
Legend
Posts: 19472
Joined: Sat Dec 07, 2002 8:04 am
Favourite Team: Toronto Argonauts
Location: Sitting in my chair, being a swell guy loved by all...
Contact:

Post by ArgoDave » Tue May 22, 2007 3:48 pm

<insert="pounding head here">:? </insert> :wink:
Gord for Mayor of Swaggerville!

User avatar
greengirl88
Superstar
Posts: 2250
Joined: Wed Oct 22, 2003 7:07 pm
Favourite Team: Saskatchewan Roughriders
Location: Bombers territory
Contact:

Post by greengirl88 » Tue May 22, 2007 6:39 pm

Ditto to the above two posts....

Thanks for all the help though, I really am making -some- progress... slowly... but almost surely...
"It's time for plan B."
"We have a plan B?"
"No, but it's time for one."
-- Stargate SG-1

User avatar
Catssuck
Champion
Posts: 3850
Joined: Tue Nov 23, 2004 1:19 pm
Favourite Team: Toronto Argonauts
Location: Oakville(Home)/Chandos Lake(Cottage)
Contact:

Post by Catssuck » Wed May 23, 2007 7:08 am

For reference you can look at this site. The tutorials are very basic but they are also easy to follow and understand.

http://www.tizag.com/phpT/forms.php
On July 13th 2007 Cossack wrote: I agree with the Argo fan.
Thanks for finally coming around Terry - the Ticats do suck.

BBBob
Hall of Famer
Posts: 9040
Joined: Sat Nov 30, 2002 9:17 am

Post by BBBob » Wed May 23, 2007 10:06 am

If you'd like, I can put together some screenshots of how to build a form using dreamweaver.

phpbb_!

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest