Formx Headless Embed | TTF Docs
Skip to main content
sdks

Formx Headless Embed

Connect any static site, Next.js/Vite app, or HTML form to Formx in seconds with zero backend code.

Option 1: Plain HTML Form

Point any HTML <form> directly to your Formx token URL:

html
<form action="https://api.timetofuture.com/api/forms/public/YOUR_TOKEN/submit" method="POST">
  <input type="text" name="name" placeholder="Your name" required />
  <input type="email" name="email" placeholder="you@company.com" required />
  <textarea name="message" placeholder="How can we help?"></textarea>
  <button type="submit">Send</button>
</form>

Option 2: JavaScript / React fetch()

fetch()
const res = await fetch('https://api.timetofuture.com/api/forms/public/YOUR_TOKEN/submit', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({
  name: 'Aarav Sharma',
  email: 'aarav@acme.com',
  budget: '$10k-$25k'
})
});
const result = await res.json();