Tutorials > HTML Code Bank > Create Form
HTML Code and Instructions to Add a Form (to Receive Info from Web Site Users)
Notes:
The REQUIRE_NAME and REQUIRE_PHONE hidden fields are optional and indicate whether or not the form should raise an error if the phone number or name are not input. The email address is ALWAYS REQUIRED.
EMAIL_SUBJECT contains the subject for the email that gets sent.
RETURN_PAGE should be a relative URL (beginning with a / E.g., /pages/mypage or / for the home page). This is what the Return button will link to after the form has been submitted.
Below is a sample HTML form that generated this output when filled out.
To create a form on one of your webpages, edit the webpage, then:
1) Locate a spot on the page where you wish to place the button / link. Click into the nearby drop down menu that says, "Select New Section to Display."
2) Select HTML (located underneath TEXT TOOLS) and click the "Add" button.
3) Paste the following code into both the sections for logged in and not logged in:
<form action="/Forms/Process.php" method="POST">
<input type="hidden" name="REQUIRE_NAME" value="1" /><!-- optional -->
<input type="hidden" name="REQUIRE_PHONE" value="1" /><!-- optional -->
<input type="hidden" name="RETURN_PAGE" value="/pages/formtest" /><!-- page return button links to after form is submitting successfully -->
<input type="hidden" name="EMAIL_SUBJECT" value="Test Form" />
Name:
<input type="text" name="NAME" size="32" /><br />
Phone Number:
<input type="text" name="PHONE_NUMBER" size="32" /><br />
Email:
<input type="text" name="EMAIL_ADDRESS" size="32" /><br />
<br />
Enter your message:<br />
<textarea name="REQUEST_MSG" rows="10" cols="80"></textarea><br />
<input type="submit" /></form>
| 
|