Docusaurus
Contact form for Docusaurus without a backend.
Docusaurus turns MDX and React components into a static documentation site. A form embedded in an MDX page cannot receive requests on the docs host, so post its standard HTML fields to FormsFort.
How it works
Three steps to production forms.
Create the endpoint form
Create a FormsFort form and copy the public access key for the Docusaurus page.
Add an MDX page
Place the form in src/pages/contact.mdx or a site component. Keep the action as a normal browser POST.
Build the docs site
Run npm run build and deploy build/. Docusaurus serves the generated files; FormsFort receives the submission.
Setup
Docusaurus MDX page with a contact form
<!-- src/pages/contact.mdx -->
import Layout from '@theme/Layout';
<Layout title="Contact">
<main>
<h1>Ask the docs team</h1>
<form action="https://api.formsfort.com/submit" method="POST">
<input type="hidden" name="access_key" value="YOUR_ACCESS_KEY" />
<label htmlFor="docusaurus-name">Name</label>
<input id="docusaurus-name" name="name" type="text" required />
<label htmlFor="docusaurus-email">Email</label>
<input id="docusaurus-email" name="email" type="email" required />
<label htmlFor="docusaurus-question">Question</label>
<textarea id="docusaurus-question" name="message" rows="7" required />
<input type="hidden" name="source" value="docusaurus-docs" />
<input type="checkbox" name="botcheck" style={{ display: 'none' }} />
<button type="submit">Send question</button>
</form>
</main>
</Layout> Migration
Migration checklist.
Move an existing form in minutes without rebuilding markup.
Create a FormsFort form and copy the public access key.
Add src/pages/contact.mdx, or put the form in a Docusaurus React component.
Set action=https://api.formsfort.com/submit with method=POST.
Use unique field ids and include name, email, message, source, and botcheck fields.
Run npm run build and deploy the generated build/ directory; do not depend on a Docusaurus runtime server.
Test the form at its deployed documentation URL and confirm the notification arrives.
Related Resources
Keep building from here.
FAQ
Common questions.
Can Docusaurus accept a form post from its build output?
No. Docusaurus generates static HTML and assets in build/; those files do not expose a request handler. Point the form action at FormsFort instead.
Does the form need a Docusaurus plugin or Node server?
No. An MDX page or React component can render the standard form without a submission plugin. The external FormsFort endpoint handles delivery.
Can I put this form inside a documentation page?
Yes. Add the markup to an MDX page or shared component that your site allows. Keep the form action, method, and FormsFort field names unchanged.
Can Docusaurus forms include an attachment?
Yes. Add enctype="multipart/form-data" and a file input, then enable uploads in FormsFort. The generated Docusaurus page still posts directly to the endpoint.
Stop managing form servers.
Create a production form endpoint, migrate your first form free, and scale when you are ready.