Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I implement html input form without backend [closed]

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

The problem is that I have no backend support. (just some static html pages)

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

Possible solution: I know there are 3rd party tools that allow you to embed their js in your page and they will persist your data on their server. I once came across one but forget its name... Could you guys suggest one, or provide better solution?

like image 916
Wint Avatar asked Jun 19 '13 14:06

Wint


People also ask

How can I submit a form without refreshing the page?

Use jQuery's submit event to handle the form submit, add return false; at the end of the submit handle function to prevent the page to reload.

How does HTML send information to backend?

The visitor's web browser uses HTML code to display the form. When the form is submitted, the browser sends the information to the backend using the link mentioned in the "action" attribute of the form tag, sending the form data to that URL. For example: <form action=https://yourwebsite.com/myform-processor.php>.

How can I submit a form without using Javascript?

Use the <noscript></noscript> tags to define a "normal" submit-button when javascript is disabled.

How can we store form data in HTML?

HTML web storage provides two objects for storing data on the client: window.localStorage - stores data with no expiration date. window.sessionStorage - stores data for one session (data is lost when the browser tab is closed)


2 Answers

If you want the contents of a form emailed to you, the form needs to be submitted to a server that can run a processing script that will either store the form data in a database or email the form data to your email address.

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

Either way, you will probably need to pay for a hosting account or a hosted solution.

If you search online for: "hosted web form solutions" you will see dozens of possible solutions.

You need to research the options.

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

http://www.tectite.com/

Tectite.com also offers a hosted form solution.

like image 148
Marc Audet Avatar answered Oct 14 '22 23:10

Marc Audet


There are many alternatives, but you should try google forms first. You can embed their forms within an IFRAME but they will take the users out of your site after the form has been submitted. If you don´t like that, or if you want to control the styles for the form, follow these steps. Google forms also support mailing you whenever a new form is sent (you can set that up in the associated spreadsheet).

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

Basically, these solutions will allow you to insert pure HTML and sometimes JavaScript into your site and the inserted script or HTML will load the the form from the external system or simply post the form to the external system without any back-end on your site.

like image 20
jacmkno Avatar answered Oct 15 '22 00:10

jacmkno