Results 1 to 7 of 7

Thread: Help w/ Forms

  1. #1
    Join Date
    Jan 2005
    Location
    SC
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Help w/ Forms

    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!

  2. #2
    Join Date
    Sep 2004
    Location
    Little Falls, Roodepoort, South Africa
    Posts
    421
    Thanks
    4
    Thanked 1 Time in 1 Post

    Default

    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.

  3. #3
    Join Date
    Dec 2004
    Location
    UK
    Posts
    2,358
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Quote Originally Posted by simonf
    You will need to do a couple of things, also ensure your host provides this service:
    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.

    1)In the header
    Excuse me? It's entirely invalid to place a form element anywhere other than within the body element of a document.

    <FORM NAME=test
    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.

    <INPUT TYPE=hidden NAME=MailTo VALUE=info@youremailaddress.com>
    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=Subject VALUE='Website Information Request'>
    <INPUT TYPE=hidden NAME=ReturnURL VALUE=http://www.yourhost.com/thanks.htm>
    That is entirely subjective and may have no relevance to the OP at all.

    <input type="submit" value="Submit" v:shapes="_x0000_s1069" tabindex="15">
    Simply
    HTML Code:
    <input type="submit" value="Submit">
    would be more correct.

    A working example if required: http://www.smos.co.za/request.htm
    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).

    I strongly suggest you correct that mark-up (validation results).

    Mike


    [edit: typo]

  4. #4
    Join Date
    Sep 2004
    Location
    Little Falls, Roodepoort, South Africa
    Posts
    421
    Thanks
    4
    Thanked 1 Time in 1 Post

    Default

    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

  5. #5
    Join Date
    Dec 2004
    Location
    UK
    Posts
    2,358
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Quote Originally Posted by simonf
    Well strange at it may seem Mike, my fluke works on many web sites not only my own
    So in other words, you're saying you can't be bothered to correct your erroneous mark-up?

    on looking at other sites they seem to have the same code in the head as well.
    Of the millions of pages that include forms, I would expect that well over 95% have them in the body element where they belong.

    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.

  6. #6
    Join Date
    Sep 2004
    Location
    Little Falls, Roodepoort, South Africa
    Posts
    421
    Thanks
    4
    Thanked 1 Time in 1 Post

    Default

    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

  7. #7
    Join Date
    Dec 2004
    Location
    UK
    Posts
    2,358
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Quote Originally Posted by simonf
    on checking the e-mail is just say the first four lines of the form should be as stated, not their position.
    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.

    So whilst my fluke works
    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.

    If you've ever received blank messages, this could be the reason why.

    Thanks mate for pointing this out
    You're welcome.

    Mike

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •