Intermediate5 min readUpdated Mar 27, 2026

How to Add a Contact Form to Angular (No Backend Required)

Add a working contact form to Angular using FormsList.

TL;DR

Add a contact form to Angular using ReactiveFormsModule and HttpClient to submit to a FormsList endpoint. No Express backend needed. FormsList handles submissions, validation, spam filtering, and notifications.

By Vaibhav Jain·Published March 27, 2026

Prerequisites

  • Angular 17+ project
  • FormsList account (free)
1

Create a FormsList endpoint

Sign up at formslist.com and create a form.

2

Generate the component

Run ng generate component contact-form.

3

Build the reactive form

Use ReactiveFormsModule and HttpClient.

import { Component } from '@angular/core';
import { ReactiveFormsModule, FormGroup, FormControl, Validators } from '@angular/forms';
import { HttpClient } from '@angular/common/http';

@Component({
  selector: 'app-contact-form',
  standalone: true,
  imports: [ReactiveFormsModule],
  template: `
    @if (submitted) { <p>Thanks!</p> }
    @else {
      <form [formGroup]="form" (ngSubmit)="onSubmit()">
        <input formControlName="name" placeholder="Name" />
        <input formControlName="email" type="email" placeholder="Email" />
        <textarea formControlName="message" placeholder="Message"></textarea>
        <button type="submit" [disabled]="form.invalid">Send</button>
      </form>
    }
  `,
})
export class ContactFormComponent {
  form = new FormGroup({
    name: new FormControl('', Validators.required),
    email: new FormControl('', [Validators.required, Validators.email]),
    message: new FormControl('', Validators.required),
  });
  submitted = false;
  constructor(private http: HttpClient) {}
  onSubmit() {
    this.http.post('https://formslist.com/f/YOUR_HASH', this.form.value,
      { headers: { Accept: 'application/json' } }
    ).subscribe(() => this.submitted = true);
  }
}
4

Add to your app

Use <app-contact-form /> in your template.

5

Test

Run ng serve and submit a test form.

Frequently Asked Questions

Do I need an Express backend?

No. The form submits directly to FormsList via HttpClient.

Can I use template-driven forms?

Yes. Use ngModel instead of ReactiveFormsModule. The FormsList endpoint accepts any POST.

Does this work with Angular signals?

Yes. Replace class properties with signal() calls.

Ready to collect form submissions?

200 free submissions a month and a live endpoint in 30 seconds. No server, no credit card, just point your form at it.

Sign up with emailView pricing