How to make HTML contact form. First part of pop-up AJAX form submission that also works with no JavaScript.
This tutorial shows how you can make a contact form. I'm making it as simple as possible so I am using text fields for all. Some people like to use combobox for subject so they can sort out mails that need to be sent on different e-mails.
Form tags:
These are form tags. In those goes form fields. About the parameters, there are 3 parameters what you can see action, method and id. Action tags mark the destination of form, method can be get or post and id marks the form(id is optional for this tutorial).Source code viewer
Programming Language: HTML
Form fields:
We are going to make 4 form fields name, senders e-mail, subject and message. We are using label tags for labels and input tags for form elements. Label is label for input. You can assign certain label to certain input by using labels for attribute and inputs name attribute. Inputs parameter type sets the type of input, we use text-boxes only. Value field is for value, you can fill values with strings when form is submitted and errors occurred, so clients data won't get lost. Size parameter controls length of text-box. By name attribute you later can catch data from POST.Source code viewer
<input type="text" name="name" value="" size="50" />Programming Language: HTML
Full code of HTML contact form:
Source code viewerProgramming Language: HTML
Next part of the tutorial: Popup Contact Form