Forms
The forms the site ships, what they check, and how to connect each one to your own service.
The forms
| Form | Where | What visitors fill in |
|---|---|---|
| Contact | /contact | Name, email, phone (optional), subject and message |
| Sign in | /auth/signin | Email, password and Remember me |
| Sign up | /auth/signup | Name, email, password and the terms box |
| Forgot password | /auth/forgot-password | |
| Google, GitHub and X buttons | /auth/signin, /auth/signup | Nothing: one click |
| Newsletter | The footer of every page | |
| Email sign-up | The home page's Where we work section | |
| Newsletter | The blog's sidebar |
The contact and account forms check every field as the visitor leaves it, with messages in the page's language: a valid email, a name of at least 2 characters, a contact subject of at least 5 and a message of at least 20, and a sign-up password of at least 8 characters with an upper-case letter, a lower-case letter, a number and a symbol.
What happens when a visitor sends one
Nothing leaves the browser. The template has no back end, so each form is ready for yours:
- The contact and account forms wait a moment and show their success message.
- The blog's newsletter box shows a thank-you state.
- The footer's newsletter box, the home page's email sign-up and the social buttons do nothing yet.
Before you launch, connect each form you keep to your own service: your API, a form service, your email platform or your sign-in provider. Remove the ones you do not need.
Keep secret keys on a server. Anything in the browser code, including a NEXT_PUBLIC_ value, can be read by every visitor.
Where each form is sent
Included with your purchase. Sign in to read, or open it in your download.
The file and function behind each form's submit button.
Connect a form to your endpoint
Included with your purchase. Sign in to read, or open it in your download.
A worked example that sends the contact form to your own endpoint, and a server route for it.
The two email boxes without a form
Included with your purchase. Sign in to read, or open it in your download.
How to turn the footer's newsletter box and the home email sign-up into working forms.
The checks and their messages
Included with your purchase. Sign in to read, or open it in your download.
Where each form's rules and error messages are defined, and how to change them.
The social sign-in buttons
Included with your purchase. Sign in to read, or open it in your download.
Where the Google, GitHub and X buttons are handled, and how to connect them.