Adding a Form to GitBook
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
- In your GitBook page, type
/and search for HTML - Select the HTML block
- Paste the following:
1<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;">
2 <input
3 type="text"
4 name="name"
5 placeholder="Your name"
6 required
7 style="padding:8px 12px;border:1px solid #d0d5dd;border-radius:6px;font-size:14px;"
8 />
9 <input
10 type="email"
11 name="email"
12 placeholder="Email address"
13 required
14 style="padding:8px 12px;border:1px solid #d0d5dd;border-radius:6px;font-size:14px;"
15 />
16 <textarea
17 name="message"
18 placeholder="Your message or feedback"
19 rows="4"
20 style="padding:8px 12px;border:1px solid #d0d5dd;border-radius:6px;font-size:14px;resize:vertical;"
21 ></textarea>
22 <button
23 type="submit"
24 style="padding:10px 20px;background:#346df1;color:#fff;border:none;border-radius:6px;font-size:14px;cursor:pointer;align-self:flex-start;"
25 >
26 Submit
27 </button>
28</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:
1<select name="type" style="padding:8px 12px;border:1px solid #d0d5dd;border-radius:6px;font-size:14px;">
2 <option value="feedback">General Feedback</option>
3 <option value="bug">Bug Report</option>
4 <option value="feature">Feature Request</option>
5</select>Pre-fill page context — pass the current page title as a hidden field so you know which doc triggered the submission:
1<input type="hidden" name="page" value="Your Page Title Here" />Step 4: Custom Redirect (Optional)
1<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.