Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 7 of 7
Like Tree1Likes
  • 1 Post By mlseim

Thread: Commanding a "send email" button

  1. #1
    Junior Member
    Join Date
    May 2014
    Posts
    9
    Member #
    39122

    Commanding a "send email" button

    I am trying to put a "contact us" box at the bottom of a page, like this one:
    https://honeywell.com/Pages/contact-us.aspx

    The code came premade, as you see below, but I have no idea what to enter in to make it actually send what was written via e-mail to my@emailaddress.com.

    Can anyone help me out?


    <div class="row">
    <div class="6u">
    <section>
    <form method="post" action="#">
    <div class="row half">
    <div class="6u">
    <input name="name" placeholder="Name" type="text" class="text" />
    </div>
    <div class="6u">
    <input name="email" placeholder="Email" type="text" class="text" />
    </div>
    </div>
    <div class="row half">
    <div class="12u">
    <textarea name="message" placeholder="Message"></textarea>
    </div>
    </div>
    <div class="row half">
    <div class="12u">
    <a href="#" class="button button-icon fa fa-envelope">Send Message</a>
    </div>
    </div>
    </form>
    </section>

  2.  

  3. #2
    Senior Member Vapr_Arts's Avatar
    Join Date
    Oct 2013
    Location
    California
    Posts
    1,930
    Member #
    37412
    Liked
    544 times
    The code to have it sent to your email is not found here. It is more than likely inside some PHP code..


    Regretfully sent from my iPhone using Tapatalk during lunch and other breaks

  4. #3
    Senior Member Ronald Roe's Avatar
    Join Date
    Mar 2011
    Location
    Oklahoma City
    Posts
    3,141
    Member #
    27197
    Liked
    959 times
    In the action attribute in the form element, you need to reference a server-side script that receives the form input and sends the email.
    Ron Roe
    Web Developer
    "If every app were designed using the same design template, oh wait...Bootstrap."

  5. #4
    Junior Member
    Join Date
    May 2014
    Posts
    9
    Member #
    39122
    I thought I had posted this, but I guess I didn't hit submit or something because I don't see it...

    I think I have this 99% figured out, but I have one hang up.

    I followed this guide to set up the e-mail box, wherein I downloaded a Formmail script, modified it, and put it in my cgi-bin.
    Using FormMail to Create a Contact Form | Web Hosting Hub

    I modified my code, too. That can be found at the bottom. But the thing doesn't work. When I click send, it just takes me to the top of the page and doesn't send it. Here is the homepage of my website - the e-mail form is all the way at the bottom of the page.
    Strongly Typed by HTML5 UP

    I thought the problem might be the line below, but I'm not sure how to fix it.
    <a href="#" class="button button-icon fa fa-envelope">Send Message</a>


    Here is my code. (personal email address altered)



    <section>
    <form action="http://www...com/cgi-bin/FormMail.pl" method="post">
    <div class="row half">
    <div class="6u">
    <input type="hidden" name="recipient" value=" ...@gmail.com, email@hotmail.com" />
    </div>
    <div class="6u">
    <input type="hidden" name="subject" value="" />
    </div>
    <div class="6u">
    <input type="hidden" name="redirect" value="http://www...com/thankyou.html" />
    </div>
    <div class="6u">
    <input name="name" placeholder="Name" type="text" class="text" />
    </div>
    <div class="6u">
    <input name="email" placeholder="Email" type="text" class="text" />
    </div>
    </div>
    <div class="row half">
    <div class="12u">
    <textarea name="message" placeholder="Message"></textarea>
    </div>
    </div>
    <div class="row half">
    <div class="12u">
    <a href="#" class="button button-icon fa fa-envelope">Send Message</a>
    </div>
    </div>
    </form>
    </section>
    Last edited by nutella; Aug 09th, 2016 at 09:11 PM.

  6. #5
    WDF Staff mlseim's Avatar
    Join Date
    Apr 2004
    Location
    Cottage Grove, Minnesota
    Posts
    7,716
    Member #
    5580
    Liked
    718 times
    You have found an old Perl script. Nothing wrong with Perl (or as many people call it "cgi"), but PHP is probably easier to use.

    I recommend you use something more like this:
    Build a Simple PHP, jQuery, and AJAX Powered Contact Form (Updated 02/05/2014) - AJ Troxell

    Their "demo" link is bad ... view their "contact" link to see it. They are using the same contact form that they describe.

    Two things about this form ....
    1) It has the ability to validate entries, such as required entries.
    2) Uses a simple captcha to keep spamming robots from sending forms.
    nutella likes this.


  7. #6
    Junior Member
    Join Date
    May 2014
    Posts
    9
    Member #
    39122
    Thanks! I'll give it a try and let you know how it goes.

  8. #7
    Senior Member Ronald Roe's Avatar
    Join Date
    Mar 2011
    Location
    Oklahoma City
    Posts
    3,141
    Member #
    27197
    Liked
    959 times
    It looks like you're already using ASP. I'm sure GAME could be of some help here.
    Ron Roe
    Web Developer
    "If every app were designed using the same design template, oh wait...Bootstrap."


Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 06:24 AM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com