Home » Php » jquery – Email contact form without PHP

jquery – Email contact form without PHP

Posted by: admin July 12, 2020 Leave a comment

Questions:

I’d like to use a contact form for a website I’m creating, but PHP is not an option since the client doesn’t wish to use it. Is there a clever way to work around this somehow, by sending email parameters (which is non-standard) perhaps, or by using an external contact form? Are there any good ones that don’t use advertising and are easily modified to a different language for example?

Thank you.

How to&Answers:

There are hundreds of embeddable (most likely iframe-based) solutions for contact forms, which would enable you to get around using a server-side language like PHP. Just a quick google search will give you some.

Alternatively, you could make a form in HTML, and have a submit button which is actually a mailto: link, and you modify the parameters of that mailto as your form inputs change.

The only downside of this is that it’s not as convenient for the user, as it then opens up their email client and they have to actually send it.

Personally, I would try and persuade the client, but if that isn’t possible, then those are your options.

Answer:

Check out formspree.

https://github.com/asm-products/formspree

For action you simply put:

<form action="http://formspree.io/[email protected]" method="post">
<input type="text" name="name">
<input type="email" name="_replyto">
<input type="submit" value="Send">

After verifying your email after the first send this will email you the contents of the form. One thing to keep in mind is that this will take the input names. If you do not include input names it won’t send you that form field.

Answer:

Check out www.enformed.io.

Has a couple of interesting options that formspree does not have( Like redirect out of the box, and a html email editor).

Answer:

I used Formspree but formspree doesn’t allow ajax unless you have Gold Version. It doesn’t work on the basic so I am planning on making an account on enformed.io. I still haven’t used it but I have heard that t is very good. You can also use alerts fro success and error messages.

<form style="margin-left: 6%;" class="email" action="https://www.enformed.io/YOUR_TOKEN" method="post">
  <p>Name:</p>
  <input type="text" name="first_name" />
  <div id="margin" style="height: 0.5%;"></div>
  <p>E-mail:</p>
  <div id="margin" style="height: 0.5%;"></div>
  <input type="text" name="email" />
  <div id="margin" style="height: 0.5%;"></div>
  <p>Subject:</p>
  <div id="margin" style="height: 0.5%;"></div>
  <input type="text" name="subject" />
  <div id="margin" style="height: 0.5%;"></div>
  <p>Message:</p>
  <div id="margin" style="height: 0.5%;"></div>
  <textarea name="message"></textarea>
  <div id="margin" style="height: 0.5%;"></div>
  <button type="submit" class="btn btn-default">Submit Form</button>
</form>

Answer:

Would something as simple as a mailto form work?