How can I implement html input form without backend

I want to implement a contact form on my site similar to this, but simpler. (I only need email and content data) http://www.squarespace.com/contact/

The problem is that I do not have backend support. (only some static html pages)

Question: How can I implement my contact form on static html pages?

Possible solution: I know that there are third-party tools that allow you to embed your js on your page, and they will be stored on your server. I once came across one, but forgot his name ... Could you guys suggest it or offer a better solution?

+6
source share
3 answers

If you want the contents of the form to be sent to you by e-mail, the form must be sent to a server that can start processing the script, which will either save the form data in the database or send the form data to your email address.

You can either get your own hosting account or pay a third party to process your form for you.

In any case, you probably have to pay for a hosting account or a hosted solution.

If you search the web for: โ€œhosted web form solutions,โ€ you'll see dozens of possible solutions.

You need to explore options.

If you need script mail of a form, I often used the following:

http://www.tectite.com/

Tectite.com also offers a hosted form solution.

+2
source

There are many alternatives, but first try google forms . You can embed your forms in IFRAME, but after submitting the form they will withdraw users from your site. If you donโ€™t like this or want to control the styles for the form, follow these steps : Google forms also support mailing when a new form is submitted (you can set it in the corresponding spreadsheet).

Other alternatives http://www.jotform.com/ or http://www.wufoo.com/

Basically, these solutions will allow you to embed pure HTML in your site, and sometimes JavaScript, and the inserted script or HTML will load the form from the external system or simply place the form in the external system without any on your website.

+2
source

The short answer is that you cannot do this using only JavaScript or jQuery. You will need a server-side handler to connect to the SMTP server in order to send mail for your form. There are fairly simple PHP scripts that can send mail, and you can use

jQuery.post

To send data

0
source

Source: https://habr.com/ru/post/947664/


All Articles