All frameworks
jQueryjQuery

Use NBForms with jQuery

If your site already uses jQuery, wiring up a contact form backend with NBForms takes only a few lines of familiar jQuery code. No new dependencies, no build tools, no backend to maintain — just the jQuery you already know.

Official jQuery docs
jQuery
<form id="contact-form" action="https://api.nbforms.com" method="POST">
  <input type="hidden" name="_token" value="YOUR_TOKEN" />
  <label>Name</label>
  <input type="text" name="name" required />
  <label>Email</label>
  <input type="email" name="email" required />
  <label>Message</label>
  <textarea name="message" required></textarea>
  <button type="submit">Send</button>
</form>

<script>
$('#contact-form').on('submit', async function (e) {
  e.preventDefault()
  const $btn = $(this).find('[type=submit]').prop('disabled', true).text('Sending…')
  const res = await fetch('https://api.nbforms.com', { method: 'POST', body: new FormData(this) })
  const data = await res.json()
  if (res.ok) $('#contact-form').replaceWith('<p>' + (data.message || 'Thanks!') + '</p>')
  $btn.prop('disabled', false).text('Send')
})
</script>

Why NBForms?

  • Works with jQuery 3.x
  • No additional dependencies or build tools
  • AJAX submission with DOM feedback
  • Compatible with any jQuery-powered site

Add to your jQuery app in minutes

Free tier included. No credit card. No backend setup — just copy the snippet above and go.

Get started free