Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

Mailto form - Urgent help needed

Options
  • 28-06-2006 12:20pm
    #1
    Closed Accounts Posts: 78 ✭✭


    Hi,

    I need some help with a form I am putting on my website. I'm avoiding ASP!

    I have 2 questions.

    Q1. At the moment, the code in my form is something like - METHOD=POST ACTION="mailto:email@address.com" enctype="text/plain"

    When the form comes in however, it has the subject 'Form posted from Microsoft Internet Explorer'. Is there any way I can change this so that it comes in as a subject of my choice?

    Q2. When people choose to submit my form, they get an annoying dialog box that says :- This form is being submitted using e-mail. Submitting this form will reveal your email address to the recipient, and will send the form data without encrypting it for privacy. You may continue or cancel this submission.

    Assuming they click on continue, there is another dialog box that says - A program is trying to automatically send email on your behalf. Do you want to allow this? If this is unexpected, it may be a virus and you should choose "no".

    This is going to live on an intranet site and the only people who will be submitting the form will be employees. Is there any way to stop these messages?

    Any help would be greatly appreciated.


Comments

  • Closed Accounts Posts: 4,655 ✭✭✭Ph3n0m


    Not really as the form is using what ever the default mail program on the user's computer is (be it Outlook, Thunderbird, etc)

    Until you move over to a script (like CGI, PHP) they will get that annoying message and I personally dont know anyway to get rid of it


  • Moderators, Society & Culture Moderators Posts: 9,689 Mod ✭✭✭✭stevenmu


    Because of various security issues, there's no way to just override these messages, even some browsers won't support submitting forms via email these days. The 'proper' way to do this these days, taking into account that you don't want to write any server side code, is using frontpage extensions. Seeing as it's an intranet site, you should be able to get the frontpage server extensions installed on the server (they probably already are if it's IIS).

    As for your form itself, if you use frontpage you can just set the properties of the form to submit via email and pick various options. If not the code for your form would be something like this
    <form method="POST" name="SurveyForm" action="_derived/nortbots.htm" onSubmit="location.href='_derived/nortbots.htm';return false;" webbot-action="--WEBBOT-SELF--" WEBBOT-onSubmit>
      <!--webbot bot="SaveResults" S-Email-Format="TEXT/PRE"
      S-Email-Address="steven@stratait.ie" B-Email-Label-Fields="TRUE"
      B-Email-Subject-From-Field="FALSE" S-Email-Subject="Survey Response"
      S-Builtin-Fields startspan --><strong>[FrontPage Save Results Component]</strong><!--webbot bot="SaveResults" endspan i-checksum="6561" -->
      <p><label for="fp1">Name</label><input type="text" name="T1" size="20" id="fp1"></p>
      <p><label for="fp2">Company</label><input type="text" name="T2" size="20" id="fp2"></p>
      <p>Take Survey <input type="radio" value="V1" checked name="R1" id="fp3"><input type="radio" name="R1" value="V2"><input type="radio" name="R1" value="V3"></p>
      <p><label for="fp4">Pick One </label><select size="1" name="D1" id="fp4">
        <option selected>one</option>
        <option>two</option>
        <option>three</option>
      </select></p>
      <p><label for="fp5">Pick Some</label><select size="3" name="D2" multiple id="fp5">
        <option>one</option>
        <option>two</option>
        <option>three</option>
      </select></p>
      <p>&nbsp;</p>
      <p><label for="fp6">What Else </label><textarea rows="8" name="S1" cols="48" id="fp6"></textarea></p>
    
      <p><input type="submit" value="Submit" name="B1"><input type="reset" value="Reset" name="B2"></p>
    </form>
    

    I think it's fairly self explanatory. As you can see this lets you pick the subject for the email too, or have it come from the value of a field in the form.


Advertisement