Skip to main content
Participant
March 21, 2018
Answered

Can someone help with code to submit form directly to an email address

  • March 21, 2018
  • 3 replies
  • 1346 views

Can someone help me with this please.  Trying to embed html into the body of an email with this form.  I need them to be able to click "submit" and the results be send directly to my email (or somewhere else only I can access).  I could also use help with sending an email with the html in the body rather than as an attachment.  This is my code:

   <form method="post" action=action="form-to-email.php">

  <div class="ax-border name ">

    <input type="text" id="name" class="si-text-field form-textbox " placeholder="Full name">

</div>

    </label>

    <div class="ax-border phone ">

      <input type="text" id="phone"   form-textbox"

        placeholder="Phone number">

<input type="submit" value="Submit"/>

      </form>

<?php$to="ryanmandree@gmail.com";?>

I appreciate any and all help.

Thank you

This topic has been closed for replies.

3 replies

Nancy OShea
Community Expert
Community Expert
March 21, 2018

If you don't have access to a web server that supports form processing scripts, use a 3rd party service like Wufoo.com. 

Nancy O'Shea— Product User & Community Expert
Nancy OShea
Community Expert
Community Expert
March 21, 2018

You cannot put a form into an email and expect it to work.  The form and processing script must reside on a web server.   Email recipients must click a link that takes them to the website.

Nancy O'Shea— Product User & Community Expert
hans-g.
Legend
March 21, 2018

Hello Ryan,

you could use this code from w3schools >>> Tryit Editor v3.5   >>> (I quote):

<!DOCTYPE html>

<html>

<body>

<h2>HTML Forms</h2>

<form action="/action_page.php">

  First name:<br>

  <input type="text" name="firstname" value="Mickey">

  <br>

  Last name:<br>

  <input type="text" name="lastname" value="Mouse">

  <br><br>

  <input type="submit" value="Submit">

</form>

<p>If you click the "Submit" button, the form-data will be sent to a page called "/action_page.php".</p>

</body>

</html>

... of interest from above see: If you click the "Submit" button, the form-data will be sent to a page called "/action_page.php".

Hans-Günter

Participant
March 21, 2018

Thank you.  How will I then retrieve the responses from action page?

BenPleysier
Community Expert
BenPleysierCommunity ExpertCorrect answer
Community Expert
March 21, 2018
Wappler is the DMXzone-made Dreamweaver replacement and includes the best of their powerful extensions, as well as much more!