Forms & Functionality

Basic Form Setup

HTML forms collect information:

Form Attributes

  • action - Where form data is sent (process.php file)
  • method - How data is sent (POST is secure)
  • required - Field must be filled

Input Types







Processing Form Submissions

To actually process forms, you need:

  1. Server-side processing (PHP, Node.js, etc.)
  2. Form handler file (process.php)
  3. Email or database setup

Simple Email Form Handler (PHP)

Create process.php:

Update your form:

Using External Services for Forms

Easier alternative - use form services that don't require server-side code:

Using Formspree.io:

Steps:
1. Go to Formspree.io
2. Create account
3. Get your form ID
4. Update action with your ID
5. Forms now work without server code

Other Services
- Basin - Simple form service
- Netlify Forms - If hosting on Netlify
- GetForm - More features
- Fabform - Email notifications

Form Validation (JavaScript)

Add JavaScript to validate before sending:

Common Form Elements

Required field:

Placeholder text:

Dropdown:

Checkboxes:
I agree

Radio buttons:
Yes
No

Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.

Still need help? Contact Us Contact Us