Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

HTML Forum


You are currently viewing our HTML Forum as a guest. Please register to participate.
Login



Post a Project »

Find a Professional HTML Freelancer!

Find a Freelancer to help you with your HTML projects

FREE Outsourcing eBook!

Reply
Looking for some help with my form please
Old 11-07-2009, 01:49 AM Looking for some help with my form please
Experienced Talker

Posts: 43
Name: Jon
Trades: 0
I have a simple form that I found from a tutorial but am now lost. Unfortunately I haven't learned forms yet.

My questions are: (based from the code below)

1. What do I add to my code to make the submit button, submit the info.
2. What do I add to my code to make my required fields, actually required upon submission?


HTML
Code:
<div id="stylized" class="myform">
                <form id="form" name="form" method="post" action="index.html">
                    <label>Name&nbsp;*</label>
                        <input type="text" name="name" id="name" />

                    <label>Email&nbsp;*</label>
                        <input type="text" name="email" id="email" />

                    <label>Website (URL)&nbsp;*</label>
                        <input type="text" name="website" id="website" />

                    <label>Phone Number</label>
                        <input type="text" name="phone number" id="phone number" />

                    <button type="submit"><img src="images/submit.gif" /></button>

                </form>
            </div>
CSS
Code:
.myform{
width:245px;
height: 340px;
padding: 60px 12px 0px 12px;
font-size:13px;
color: #ffffff;
}
#stylized{
background: url(images/quote-request-2.gif) no-repeat;
}
#stylized label{
display:block;
font-weight:bold;
width:140px;
text-align: left;
margin-left: 10px;
}
#stylized input{
font-size:13px;
padding:4px 2px;
width:200px;
margin:2px 0 10px 10px;
}
#stylized button{
background: none;
border: none;
margin-left:111px;
width:109px;
height: 30px;
}
Foppa is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 11-07-2009, 04:38 AM Re: Looking for some help with my form please
Skilled Talker

Posts: 88
Name: Brent
Location: Online
Trades: 0
I don't think the validation is going to work in HTML. You're doing to need PHP or some JavaScript for that
__________________

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE

Last edited by Custom Cars; 11-07-2009 at 04:43 AM..
Custom Cars is offline
Reply With Quote
View Public Profile Visit Custom Cars's homepage!
 
Old 11-07-2009, 04:40 AM Re: Looking for some help with my form please
chrishirst's Avatar
Missing! presumed drunk.

Posts: 42,371
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
Quote:
1. What do I add to my code to make the submit button, submit the info.
HTML Code:
<input type="submit" name="go" value="Send it!" />
__________________
Chris. ->>
Please login or register to view this content. Registration is FREE
<<-

A foolish consistency is the hobgoblin of little minds
Thought for today:- Is SEO the only industry where all the cowboys are Indians?
chrishirst is offline
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 11-07-2009, 04:42 AM Re: Looking for some help with my form please
chrishirst's Avatar
Missing! presumed drunk.

Posts: 42,371
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
Quote:
What do I add to my code to make my required fields, actually required upon submission?
With javascript or serverside code
__________________
Chris. ->>
Please login or register to view this content. Registration is FREE
<<-

A foolish consistency is the hobgoblin of little minds
Thought for today:- Is SEO the only industry where all the cowboys are Indians?
chrishirst is offline
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 11-07-2009, 04:46 AM Re: Looking for some help with my form please
Experienced Talker

Posts: 43
Name: Jon
Trades: 0
Quote:
Originally Posted by chrishirst View Post
HTML Code:
<input type="submit" name="go" value="Send it!" />
Thank you.

How do I tell it where to send the info? Is that where the javascript comes in?
Foppa is offline
Reply With Quote
View Public Profile
 
Old 11-07-2009, 04:47 AM Re: Looking for some help with my form please
chrishirst's Avatar
Missing! presumed drunk.

Posts: 42,371
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
Nope, that's what the action attribute value does.
__________________
Chris. ->>
Please login or register to view this content. Registration is FREE
<<-

A foolish consistency is the hobgoblin of little minds
Thought for today:- Is SEO the only industry where all the cowboys are Indians?
chrishirst is offline
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 11-07-2009, 04:48 AM Re: Looking for some help with my form please
chrishirst's Avatar
Missing! presumed drunk.

Posts: 42,371
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
http://www.w3schools.com/html/html_forms.asp
__________________
Chris. ->>
Please login or register to view this content. Registration is FREE
<<-

A foolish consistency is the hobgoblin of little minds
Thought for today:- Is SEO the only industry where all the cowboys are Indians?
chrishirst is offline
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 11-07-2009, 05:02 AM Re: Looking for some help with my form please
Experienced Talker

Posts: 43
Name: Jon
Trades: 0
I see, thank you.

Quote:
Originally Posted by chrishirst View Post
HTML Code:
<input type="submit" name="go" value="Send it!" />

Where do I put that exactly, just as the last line of code?

Also, is this line correct that I have in my code? And/or do I need to combine it with the code you gave me since it's the submit image?

Code:
<button type="submit"><img src="images/submit.gif" /></button>
Foppa is offline
Reply With Quote
View Public Profile
 
Old 11-07-2009, 05:39 AM Re: Looking for some help with my form please
chrishirst's Avatar
Missing! presumed drunk.

Posts: 42,371
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
http://www.w3schools.com/tags/tag_button.asp
__________________
Chris. ->>
Please login or register to view this content. Registration is FREE
<<-

A foolish consistency is the hobgoblin of little minds
Thought for today:- Is SEO the only industry where all the cowboys are Indians?
chrishirst is offline
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 11-07-2009, 02:02 PM Re: Looking for some help with my form please
Banned

Posts: 3
Name: Carmen Shah
Trades: 0
Wow w3schools a great site thanks chrish
carmen007 is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Looking for some help with my form please
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.40947 seconds with 12 queries