Hey, I'm new here.
My question is: Is there anyway to create a form that has a Submit button that once clicked, emails the info entered in the form to a specific email address?
Thanks for your help!
Hey, I'm new here.
My question is: Is there anyway to create a form that has a Submit button that once clicked, emails the info entered in the form to a specific email address?
Thanks for your help!
Hi
YES...
You will need to do a couple of things, also ensure your host provides this service:
1)In the header just under META tag place the following lines and modify
<FORM NAME=test METHOD=post ACTION=http://www.yourhost.com/pubscripts/formmail.asp>
<INPUT TYPE=hidden NAME=MailTo VALUE=info@youremailaddress.com>
<INPUT TYPE=hidden NAME=Subject VALUE='Website Information Request'>
<INPUT TYPE=hidden NAME=ReturnURL VALUE=http://www.yourhost.com/thanks.htm>
2) In the body of the form place your form fields and on the submit button ensure it looks roughly like this <input type="submit" value="Submit" v:shapes="_x0000_s1069" tabindex="15">
A working example if required: http://www.smos.co.za/request.htm
rgds,simonf![]()
Last edited by simonf; 01-06-2005 at 02:13 PM.
I would think that instructing the OP to look for a form mail service is about all that's necessary. Any other instructions would depend on the service used.Originally Posted by simonf
Excuse me? It's entirely invalid to place a form element anywhere other than within the body element of a document.1)In the header
I don't see any need to name the form. Moreover, the name attribute should only be used if backward compatibility with ancient browsers like NN4 is desired (or required). The id attribute should be used instead.<FORM NAME=test
If attribute values contain any characters other than letters, digits, hyphens, periods, underscores or colons, they must be quoted. This applies to the ReturnURL input element below, too.<INPUT TYPE=hidden NAME=MailTo VALUE=info@youremailaddress.com>
That is entirely subjective and may have no relevance to the OP at all.<INPUT TYPE=hidden NAME=Subject VALUE='Website Information Request'>
<INPUT TYPE=hidden NAME=ReturnURL VALUE=http://www.yourhost.com/thanks.htm>
Simply<input type="submit" value="Submit" v:shapes="_x0000_s1069" tabindex="15">
would be more correct.HTML Code:<input type="submit" value="Submit">
I am certain that works only as a fluke. That form must contain the form controls. It does not belong in the head of a document. As soon as a user agent encounters the form element, it should assume that the head element has ended and the body element has begun (the starting and closing tags of both the head and body elements are optional).A working example if required: http://www.smos.co.za/request.htm
I strongly suggest you correct that mark-up (validation results).
Mike
[edit: typo]
Well strange at it may seem Mike, my fluke works on many web sites not only my own, and as I got this bit of code my my service provider and they have a few hundred thousand users.. I kind of believe them... on looking at other sites they seem to have the same code in the head as well. Simonf
So in other words, you're saying you can't be bothered to correct your erroneous mark-up?Originally Posted by simonf
Of the millions of pages that include forms, I would expect that well over 95% have them in the body element where they belong.on looking at other sites they seem to have the same code in the head as well.
For goodness sake, use your common sense.
Mike
Could you point to your service provider's instructions? I'm intrigued.
[edit: missed a point]
Last edited by mwinter; 01-07-2005 at 11:27 AM.
HI Mike
I appologise... on checking the e-mail is just say the first four lines of the form should be as stated, not their position. So whilst my fluke works you are correct.
Thanks mate for pointing this out...... rgds,Simonf![]()
Whilst service providers aren't the best source of information when it comes to authoring (most of the information I've seen is out-dated), I'd be shocked if they were to make such a big mistake.Originally Posted by simonf
I would guess that when the submit button is activated, the user agent would realise that whilst the button isn't contained within a form, there is only one form in the document so it must be the right one. This is a reasonable assumption (though still, don't rely on it - a user agent shouldn't have to error correct anything). However, it's a big leap (in my opinion) for the user agent to add the other form controls that aren't explicitly contained during submission.So whilst my fluke works
If you've ever received blank messages, this could be the reason why.
You're welcome.Thanks mate for pointing this out
Mike
Bookmarks