7 Replies Latest reply on May 21, 2010 11:14 AM by WeaselFlix

    Pointing Submit button to an email address

    WeaselFlix

      My host site does not have a feature that allows you to automatically point forms to an email address so I must do so in the code itself.  I'm not sure what the coding is or where exactly to place it.  Below is my contact form code.  Any help would be greatly appreciated.  Thanks.

       

      ~P

       

      Your Email
      <input type="text" name="Email" id="Email" />
            </label>
            <span class="textfieldRequiredMsg">A value is required.</span></span>
          <p><span id="sprytextarea1">
          <label>Inquiry
            <textarea name="Message" id="Message" cols="45" rows="5"></textarea>
            <span id="countsprytextarea1"> </span></label>
          <span class="textareaRequiredMsg">A value is required.</span><span class="textareaMaxCharsMsg"><br />
          Exceeded maximum number of characters.</span></span></p>
          <p>
            <label>Contact Paul
      <input type="submit" name="Send" id="Send" value="Send" />         
            </label>
          </p>
        </form>
        <p>Email: Paul@PaulDHart.com</p>
      <p><a href="http://www.imdb.com/name/nm2185057/" target="_blank">Paul's IMDB Page</a></p>
        <p><a href="http://twitter.com/doublehguys" target="_blank">Follow Paul on Twitter</a></p>
      </div>
      <p> </p>
      <script type="text/javascript">
      <!--
      var sprytextfield1 = new Spry.Widget.ValidationTextField("sprytextfield1", "none", {validateOn:["blur"]});
      var sprytextarea1 = new Spry.Widget.ValidationTextarea("sprytextarea1", {validateOn:["blur"], maxChars:600, counterType:"chars_remaining", counterId:"countsprytextarea1"});
      //-->
      </script>
      </body>
      </html>

        • 1. Re: Pointing Submit button to an email address
          Donald Booth Level 3

          You have to send that form to a server side page, like ASP or PHP.

          That dynamic page should format the form data into an email and then you use the server capability of the server to send the actual email.

          Let us know what language your server can use and we can be more specific.

          The Exchange has some extension that might help.

          http://www.adobe.com/cfusion/exchange/index.cfm?searchfield=email&search_exchange=3&search _category=-1&search_license=&search_rating=&search_platform=0&search_pubdate=&num=25&start num=1&event=search&sticky=true&sort=0&rnav_dummy_tmpfield=&Submit=

           

          Thanks,

          Donald Booth

          Adobe Dreamweaver Team

          • 2. Re: Pointing Submit button to an email address
            WeaselFlix Level 1

            I use iPage as a host but it doesn't have a page to set up the forms like some do (i.e. godaddy) so I don't know the php code to put in etc.  Below is some of the stats listed from my host.  I don't know if this helps.

             

            So the extensions you posted are for Dreamweaver to help design your contact forms with the email account?

             

            Incoming Mail Server:
            pop.website.com
            Outgoing Mail Server:
            smtp.website.com
            Platform Type:
            Debian
            MySQL Version:
            boscustsqlm08
            Perl Version:
            5.8.8
            PHP Version:
            5.2.12
            Path to SendMail:
            /usr/sbin/sendmail
            Path to Perl:
            /usr/bin/perl
            Path to PHP:
            /usr/local/bin/php


            • 3. Re: Pointing Submit button to an email address
              WeaselFlix Level 1

              Here is iPage's form instructions if this helps:

               

              Getting started

              Create an HTML form with the following tags:

              • A standard <form> tag that contains the path to the  Form->Email processing script

                <form method= "post"  action="http://www.ipage.com/scripts/formemail.bml">
              • A hidden tag. This tag means it cannot be seen by your  customers and tells the form where to email the contents of the form.

                <input type="hidden" name="my_email" value="youremail">

              How to create an input field

              Create an input field for each piece of data you wish to collect
                To create an input field you can use a tag such as this:

                <input type="text" name="fieldname" size="25">                

                For example if you wanted to create a input field called fullname it would look like this:

                <input type="text" name="fullname" size="25">

              Customizing the default subject line

                You can customize the default subject line by using this hidden tag  and replacing subject with what you want the subject to be                

                <input type="hidden" name="subject" value="subject">

              Including an input field into the email  subject line

                If you want to include one of the input fields in the return email's  subject field, all you need to do is replace "Subject" in your code with  the NAME of the field surrounded by  %%.                 

                For example, if your form contains a field named firstname,   it would look like this

                <input type="hidden" name="subject" value="form submission from  %%firstname%%">

              Making an input field required

                If you want to make a certain  input field required in your form. Use  the following tag

                <input type="hidden" name="required" value="field1,fieldn">                

                For example, if you were making the field named emailadress and firstname, your tag would look like this                

                Note: "required" must be in lower-case letters to be  recognized by our processor; name="REQUIRED" may not work.                <input type="hidden" name="required" value="emailaddress,  firstname">

              Customizing the pages seen after  form completion

              You can send your visitors to various URLs after they have  completed the form.

              • To send them to a specific page after they have completed the  form successfully by using the tag below and replacing "yoururl" with  the page name. The URL does not have to be on your site or even hosted  with iPage. It is best to use full path names  (http://www.yoursite.com/page.html) and not local paths (/page/html).

                <input type="hidden" name="thankyou_url" value="yoururl">

              • If a customer fills out your form incorrectly, you can customize  the "error" page by they see inserting the following line of code in  your form:

                <input type="hidden" name="error_url" value="yoururl">

              Changing the order of your form  results

              By default, the results of your form are displayed alphabetically  by field name

              • To change this order,you will need to use the following syntax.

                <input type="hidden" name="order"  value="field,field2,field3">


              Adding a blind carbon copy (bcc)  email address

              You can have an email address as an blind carbon copy to the  results of your form.

              • Use the following syntax to add a bcc email address:

                <input type ="hidden" name ="bcc" value="bbcemailaddress">


              Specifying a return email address

              Have your customers insert their email address into your form.

              • Use the following syntax to have your customers add their email  address:

                <input type="text" name="email">


              Adding Submit and Reset buttons

              Include buttons to submit your customer's data or reset values.  You can change the text that appears on the button by editing the value field.

               

              • Use the following syntax to include submit and reset buttons:

                <input type="submit" name="submit" value="Submit Now" >
                <input type="reset" name="reset" value="Reset" >
              • 4. Re: Pointing Submit button to an email address
                bregent Most Valuable Participant

                >Here is iPage's form instructions if this helps:

                 

                If it helps who? Didn't you start this thread? The page you copied provides the complete instructions. Is there some specific part you do not understand?

                • 5. Re: Pointing Submit button to an email address
                  WeaselFlix Level 1

                  The post above asked for specifics from the host.  I was trying to provide as much info as possible.  I created my forms via Dreamweaver so the info about creating the text fields isn't what I need to know.  I'm still having problems with coding the forms to be emailed to my webmail.  Below is my code for my contact page.  I assume I'm supposed to use this code provided from iPage:

                   

                  <form method= "post"  action="http://www.ipage.com/scripts/formemail.bml">

                  <input type="hidden" name="my_email" value="youremail">

                   

                  Here is where I've plugged in that code:

                   

                  <span id="sprytextfield1">
                  <form method= "post" action="http://www.ipage.com/scripts/formemail.bml"> 

                        <label>Your Email
                          <input type="text" name="your email" id="your email" />
                        </label>
                        <span class="textfieldRequiredMsg"><br />
                        A value is required.</span></span>
                      <p><span id="sprytextarea1">
                      <label>Message Paul
                        <textarea name="Message" id="Message" cols="45" rows="5"></textarea>
                        <span id="countsprytextarea1"> </span></label>
                      <br />
                      <label>Submit Inquiry
                  <input type="hidden" name="my_email" value="paul@pauldhart.com">
                        <input type="submit" name="Submit" id="Send" value="Send" />
                      </label>

                   

                   

                  The forms still aren't being emailed to my webmail.  I'm not sure where my coding is off so I still need a bit of advice.

                  • 6. Re: Pointing Submit button to an email address
                    bregent Most Valuable Participant

                    Form looks right although I don't see a closing form tag in the code you posted. Are you getting any errors when you submit? Have you tried contacting your host support?

                    • 7. Re: Pointing Submit button to an email address
                      WeaselFlix Level 1

                      I contacted the Host twice, however they just point me to the help page I posted above.  I'll try again to see if they have any other suggestions.  I'm not getting any errors when I submit.  It just clears the forms as though the message has been sent.  It just doesn't arrive in the inbox.