Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

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

New Here ,
Mar 20, 2018 Mar 20, 2018

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

1.4K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Expert , Mar 21, 2018 Mar 21, 2018
Translate
LEGEND ,
Mar 20, 2018 Mar 20, 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

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Mar 21, 2018 Mar 21, 2018

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

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Mar 21, 2018 Mar 21, 2018

Have a look at Alt-Web Design & Publishing: Responsive Contact Form with Bootstrap 3.2 and PHP (Part 1)

Wappler is the DMXzone-made Dreamweaver replacement and includes the best of their powerful extensions, as well as much more!
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Mar 21, 2018 Mar 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 & Moderator
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Mar 21, 2018 Mar 21, 2018
LATEST

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 & Moderator
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines