Prerequisites
Before using the Form Widget, make sure you’ve installed the Widgets library.Quick Setup
The fastest way to add a form widget:- Visit your Givebutter Dashboard
- Select your campaign
- Navigate to Sharing > Widgets
- Choose Form as the widget type
- Customize the appearance (optional)
- Copy the generated code
- Paste it where you want the form to appear on your site
Manual Setup
For greater control, you can manually create form widgets using the<givebutter-form> tag:
Configuration Options
Required Attributes
| Attribute | Description | Example |
|---|---|---|
campaign | Your campaign code (find it in your campaign URL) | my-campaign |
Optional Attributes
The form widget inherits the styling configured in your Givebutter Dashboard for the campaign. All colors, fonts, and branding are automatically applied.Layout Considerations
The form widget is responsive and will adapt to its container width. Consider these best practices:Container Width
Container Width
For optimal display:
- Minimum width: 320px (mobile phones)
- Recommended width: 400-600px for best readability
- Maximum width: No limit, but forms look best under 800px
Page Layout
Page Layout
Common layout patterns: - Full-width section: Great for dedicated donation pages - Sidebar
widget: Works in sidebars 300px+ wide - Centered container: Most popular for focused
donation experiences - Multi-column: Use columns for multiple campaign forms
Height & Scrolling
Height & Scrolling
- Forms expand automatically to fit content - No fixed height needed - Forms include all fields, so ensure adequate vertical space - Consider page length when embedding multiple forms
Mobile Responsiveness
Mobile Responsiveness
- Forms automatically optimize for mobile devices
- Touch-friendly input fields and buttons
- Stacks elements vertically on small screens
- Test on actual mobile devices for best results
Use Cases
- Dedicated Donation Page
- Campaign Landing Page
- Event Registration
- Multiple Campaigns
Create a full-page donation experience:
Styling & Customization
Styling via Dashboard
The form’s appearance is controlled through your Givebutter Dashboard:- Go to your campaign settings
- Navigate to Design or Branding
- Customize:
- Primary colors
- Button styles
- Fonts and typography
- Logo and images
Container Styling
You can style the container around the form widget:Important: Only style the container around the form widget. The form’s internal styling is
managed through your Dashboard to ensure consistent branding and optimal user experience.
Form vs Button Widget
Not sure which widget to use? Here’s a quick comparison:| Feature | Form Widget | Button Widget |
|---|---|---|
| Display | Inline on page | Opens in popup modal |
| Page Layout | Takes vertical space | Minimal space (just button) |
| User Experience | Direct, no popup | Non-disruptive, overlay |
| Best For | Dedicated donation pages | Navigation bars, CTAs |
| Mobile Experience | Full-page scroll | Modal overlay |
| Multiple Campaigns | Requires more vertical space | Compact, multiple buttons easy |
Performance Optimization
The form widget loads asynchronously to avoid blocking your page:- Initial load shows a placeholder
- Form loads in the background
- No impact on page speed scores
- Optimized for Core Web Vitals
Troubleshooting
Form appears too small
Form appears too small
The form adapts to its container. Ensure the container is at least 320px wide. Check for CSS that might be constraining the width.
Form is cut off
Form is cut off
Forms expand vertically to fit content. Ensure there’s no
max-height or overflow: hidden on
parent containers.Multiple forms on one page
Multiple forms on one page
You can embed multiple forms on the same page. Each will load independently. Consider spacing them
with margin/padding for better UX.
Form styling doesn't match my site
Form styling doesn't match my site
Form styling is controlled in your Givebutter Dashboard under campaign settings. Update your campaign’s design settings to match your brand.