Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Introduction to forms?

Status
Not open for further replies.

alexanderdring

Technical User
Dec 27, 2002
36
FR
Hi everyone,

I was just wondering if someone could give me a quick run-down on forms. I've looked at the Dreamweaver help file and I'm stuck. Basically, all I want is for users on my site to click one or more tick boxes/radio buttons, which correspond to catalogues they would like sent to them. When they then enter their business address into a box and press a SUBMIT button, I'd like an e-mail to be generated and sent to me with details of what they have chosen and their address. I'd be really grateful for any help because at the moment I've hit a brick wall.

Thanks.
 
Put your form controls on your page, each with a descriptive name you will recognize. Also add a Submit button:

<FORM ACTION=&quot;mailto:datamasterfla@yahoo.com?Subject=Test&quot;>
**add your controls here**
<input type=&quot;Submit&quot; name=&quot;btnSubmit&quot;>
</FORM>

Each one of your controls will be added to the message body in the order they appear on your form, with the name of the control first, then the value.

Dan.
 
To clarify on Dan1967, a control for radio or checkbox would go something like:
[maroon]
<input type=&quot;checkbox&quot; name=&quot;Subscription_1&quot; value=&quot;Send_To_Me&quot;>
[/color]

Your email would then show something like:
[maroon]
Subscription_1: Send_To_Me[/color]
and if not checked not show anything at all.

I would suggest not using the 'mailto' attribute for a form post. A very widely used script it FormMail.pl or versions of it. Check out Matt's Script Archive (scriptarchive.com) for the free download.

There are many tutorials available free on the net about 'HTML Forms'. Do some searching around, you can learn alot from the simple tutorials.

DeZiner
Never be afraid to try something new.
Remember that amateurs built the Ark.
Professionals built the Titanic
 
DeZiner brings a good point of how to get the email generated, but there seems to be security issues with Matt's Formmail

Try here for a more secure version. It's very easy to customize - also can &quot;hide&quot; email address from harvesters.


Then in your DW html file you'll see something like this:
<form action=&quot; method=&quot;post&quot; enctype=&quot;application/x- name=&quot;cForm&quot; id=&quot;cForm&quot;>
<input type=&quot;hidden&quot; name=&quot;recipient&quot; value=&quot;2&quot;>
<input type=&quot;hidden&quot; name=&quot;subject&quot; value=&quot;Contact Form&quot;>

Hope this helps,
Max

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top