Prerequisites
Before using the Form Widget, make sure you’ve installed the Widgets library.Quick Setup
The fastest way to add a form widget is through the Givebutter Dashboard:- Visit your Givebutter Dashboard
- Select your campaign and navigate to Sharing > Widgets
- Choose Form as the widget type and customize the appearance
- Copy the generated code and paste it on your site
Manual Setup
For full control without using the dashboard, create forms directly with the<givebutter-form> tag:
Configuration Options
Required Attributes
| Attribute | Description | Example |
|---|---|---|
campaign | Your campaign code (from your dashboard) | my-campaign |
Optional Attributes
| Attribute | Description | Default |
|---|---|---|
show-goal-bar | Display a goal bar above the form | false |
theme-color | Theme color for the goal bar | None |
max-width | Maximum width of the form | 560px |
max-height | Maximum height of the form | None |
The form’s internal styling (colors, fonts, branding) is controlled through your Givebutter
Dashboard campaign settings and 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
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.