Documentation
    Platforms

    GitBook Forms: HTML Block Setup

    Embed a feedback or contact form in GitBook docs with an HTML block that posts to a Formboost endpoint: fields, redirect, spam screening, notifications.

    GitBook is a documentation platform that supports embedded HTML content. You can use Formboost to add a contact form, feedback form, or bug report form directly inside your docs.

    Note: Custom HTML embeds require a GitBook Pro or Enterprise plan.

    Prerequisites

    • A Formboost account (sign up free)
    • A GitBook space on Pro or Enterprise plan

    Step 1: Create a Formboost Endpoint

    Log in to your Formboost dashboard and create a new endpoint. Copy the endpoint URL:

    https://formboost.app/f/YOUR_ENDPOINT_ID

    Step 2: Add an HTML Block in GitBook

    1. In your GitBook page, type / and search for HTML
    2. Select the HTML block
    3. Paste the following:
    <form action="https://formboost.app/f/YOUR_ENDPOINT_ID" method="POST" style="display:flex;flex-direction:column;gap:10px;max-width:480px;font-family:inherit;">
      <input
        type="text"
        name="name"
        placeholder="Your name"
        required
        style="padding:8px 12px;border:1px solid #d0d5dd;border-radius:6px;font-size:14px;"
      />
      <input
        type="email"
        name="email"
        placeholder="Email address"
        required
        style="padding:8px 12px;border:1px solid #d0d5dd;border-radius:6px;font-size:14px;"
      />
      <textarea
        name="message"
        placeholder="Your message or feedback"
        rows="4"
        style="padding:8px 12px;border:1px solid #d0d5dd;border-radius:6px;font-size:14px;resize:vertical;"
      ></textarea>
      <button
        type="submit"
        style="padding:10px 20px;background:#346df1;color:#fff;border:none;border-radius:6px;font-size:14px;cursor:pointer;align-self:flex-start;"
      >
        Submit
      </button>
    </form>

    Replace YOUR_ENDPOINT_ID with your actual endpoint ID.

    Step 3: Customize for Your Use Case

    Feedback form — add a rating or category field:

    <select name="type" style="padding:8px 12px;border:1px solid #d0d5dd;border-radius:6px;font-size:14px;">
      <option value="feedback">General Feedback</option>
      <option value="bug">Bug Report</option>
      <option value="feature">Feature Request</option>
    </select>

    Pre-fill page context — pass the current page title as a hidden field so you know which doc triggered the submission:

    <input type="hidden" name="page" value="Your Page Title Here" />

    Step 4: Custom Redirect (Optional)

    <input type="hidden" name="_redirect" value="https://yoursite.com/docs/thank-you" />

    Step 5: Test It

    Save the page and submit the form. The submission appears in your Formboost dashboard and triggers an email notification.

    Next Steps

    Written by · Last updated