SitePoint Sponsor

User Tag List

Results 1 to 11 of 11
  1. #1
    SitePoint Zealot
    Join Date
    Nov 2008
    Location
    UK
    Posts
    163
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    contact form without a form handler?

    Advice for an html novice please.

    I am working on a website hosted by an ISP which supports only html.

    I need to include a contact form, and would normally use php for this. My html experience is pretty limited, and i just can't figure out how to handle the POST data without a server-side script.

    Am i missing something obvious?? Could anyone recommend a good tutorial on html forms ?

    Thanks.

  2. #2
    Follow: @AlexDawsonUK silver trophybronze trophy AlexDawson's Avatar
    Join Date
    Feb 2009
    Location
    England, UK
    Posts
    8,111
    Mentioned
    0 Post(s)
    Tagged
    1 Thread(s)
    You could use the mailto protocol and forward on the various details however be warned that there is a limit to how long a string can be in an address such as that so you would have to put a limit on the length of the message.

  3. #3
    billycundiff{float:left;} silver trophybronze trophy RyanReese's Avatar
    Join Date
    Oct 2008
    Location
    Whiteford, Maryland, United States
    Posts
    13,782
    Mentioned
    16 Post(s)
    Tagged
    0 Thread(s)
    I would get a new host. Most links that use mailto: are not really good. Anytime I see them in the status bar I just ignore that mail link altogether. Does your host have any cgi scripts? Personally pay the extra 5 bucks or whatever it is to get server support. I'm an HTML/CSS guy and I still want the server-side support for registration/members and emailing capabilities.

    Get a host that supports PHP: that would be preferable and you could use the PHP mail function which is easy to use and reliable.
    Always looking for web design/development work.
    http://www.CodeFundamentals.com

  4. #4
    SitePoint Wizard Stomme poes's Avatar
    Join Date
    Aug 2007
    Location
    Netherlands
    Posts
    10,287
    Mentioned
    51 Post(s)
    Tagged
    2 Thread(s)
    mailto will also lock out any visitors who, like me, use web mail. I don't have Outlook and I'll die before I ever get it.

  5. #5
    billycundiff{float:left;} silver trophybronze trophy RyanReese's Avatar
    Join Date
    Oct 2008
    Location
    Whiteford, Maryland, United States
    Posts
    13,782
    Mentioned
    16 Post(s)
    Tagged
    0 Thread(s)
    I don't even have outlook/an email program like that installed. I don't even know what will popup and most likely I'll have to give them my information for them to get into my account and be able to send mail from there. TBH I don't trust that crap. I prefer being the boss of my apps. If you really must use mailto: I recommend having a little disclaimer "For those of you who don't have an email program you can directly email me by emailing me at <emailHere />"
    Always looking for web design/development work.
    http://www.CodeFundamentals.com

  6. #6
    SitePoint Wizard Stomme poes's Avatar
    Join Date
    Aug 2007
    Location
    Netherlands
    Posts
    10,287
    Mentioned
    51 Post(s)
    Tagged
    2 Thread(s)
    For our sites I have the email address sitting out, wrapped in an anchor with the mailto: stuff. Those like me will copy-paste the email address to use in our own programs, and those with something like Outlook can just click. If I click, nothing happens. The computer looks for a mail app to load, doesn't find one, gives an error.

  7. #7
    billycundiff{float:left;} silver trophybronze trophy RyanReese's Avatar
    Join Date
    Oct 2008
    Location
    Whiteford, Maryland, United States
    Posts
    13,782
    Mentioned
    16 Post(s)
    Tagged
    0 Thread(s)
    Yea that's perfect, I love when sites do that because it gives the option of copy paste into gmail. Forms just get risky for me so I try to avoid them unless it is semantically neccessary and I can't do without it. Of course I get the sites with PHP so I'm not guilty
    Always looking for web design/development work.
    http://www.CodeFundamentals.com

  8. #8
    SitePoint Zealot
    Join Date
    Nov 2008
    Location
    UK
    Posts
    163
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Ryan - I'm with you. I would really like a php host, but my clients insist they like their site where it is!.

    So, if i understand correctly, there is no way of handling POST data with html? My only option is to put the mailto in the form action?

    My php contact page would usually handle the 'not filled in required fields' or 'invalid email address', etc and show the form again if needed. Instead, I can use javascript to check all that as they go, assuming it is enabled - is there any other way, in case it is not?.

    If my form action is a mailto, how do i then redirect to a 'thank you for mailing....' page if the message is sent successfully?

    Stomme poes, just out of interest, what do you have against mail apps? is thunderbird really that bad?

    I assume most 'average web users' will be using an outlook app of some sort - just as microsoft decided they should. Do you think many 'normal' users don't??

  9. #9
    SitePoint Evangelist Karpie's Avatar
    Join Date
    Jul 2007
    Location
    Perth, Australia
    Posts
    445
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by treacle0996 View Post
    I assume most 'average web users' will be using an outlook app of some sort - just as microsoft decided they should. Do you think many 'normal' users don't??
    I would say most users don't use desktop mail apps, and very few would use Outlook ones. From what I've seen, only corporate and business people generally use Outlook, and most other people use some variety of webmail.

  10. #10
    SitePoint Addict
    Join Date
    Jan 2002
    Location
    Southwest Florida
    Posts
    393
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by treacle0996 View Post
    So, if i understand correctly, there is no way of handling POST data with html? My only option is to put the mailto in the form action?
    Correct. HTML is strictly a markup language. It has no facility for handling form data.

    Instead, I can use javascript to check all that as they go, assuming it is enabled - is there any other way, in case it is not?.
    If javascript is disabled and you have no server-side scripting available, then no validating will occur, period. That's one of the drawbacks of mailto

    If my form action is a mailto, how do i then redirect to a 'thank you for mailing....' page if the message is sent successfully?
    You can't. That's one of the drawbacks of mailto

    I assume most 'average web users' will be using an outlook app of some sort - just as microsoft decided they should. Do you think many 'normal' users don't??
    I think more and more "average" users are using hotmail, gmail, yahoo mail, etc. They don't know how to set up their email program and they don't want to learn. And they like being able to check their email from any computer. And they don't need to worry about their address changing just because they changed ISPs.

    You could look into using a third-party form processing service. I don't know of any off the top of my head, but I know they exist. You would set the action of the form to the URL provided by the service, and they would process the form and handle the redirection. You'd have to find one you trusted, and I'd guess the trustworthy ones charge a fee. Your client may not go for that for a variety of reasons.

    Basically, your client is insisting on using a host that severely limits your ability to implement what they want. You need to make it clear that their host is the problem, not you. Somebody buys a Yugo, they shouldn't be surprised when it can't pull a 5-ton boat and trailer.

  11. #11
    SitePoint Zealot
    Join Date
    Nov 2008
    Location
    UK
    Posts
    163
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thank you people.

    Think i'll forget the fom, and go with a link instead.


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
  •