A comprehensive Discourse plugin for creating interactive surveys with multiple field types. This plugin allows you to embed surveys directly into your posts and collect structured responses from your community members.
- 7 Different Field Types: Radio buttons, checkboxes, dropdowns, text areas, number selection, star ratings, and thumbs up/down
- Required/Optional Fields: Mark fields as required to ensure completion
- Emoji Support: Use emojis in your survey options
- HTML Support: Rich text formatting in questions and options
- User Authentication: Automatic login prompts for anonymous users
- Response Tracking: Prevents duplicate submissions from the same user
- Permission Aware: Respects topic and category permissions
- Mobile Responsive: Works seamlessly on all devices
Follow the Install a Plugin guide from Discourse Meta using:
git clone https://github.com/discourse-org/discourse-surveys.gitAfter installation, enable the plugin in your admin settings:
- Navigate to Admin โ Plugins
- Find discourse-surveys and enable it
- Set
surveys_enabledtotruein site settings
All surveys must be wrapped in [survey] tags:
[survey name="my-survey" title="Customer Feedback Survey"]
<!-- Survey fields go here -->
[/survey]name: Unique identifier for the survey (defaults to "survey")title: Optional title displayed at the top of the surveypublic: Set visibility (future feature)status: Survey status (future feature)
[radio question="What is your favorite color?"]
- Red
- Blue
- Green
- Yellow
[/radio][checkbox question="Which features do you use? (Select all that apply)"]
- Email notifications
- Mobile app
- Desktop notifications
- API access
[/checkbox][dropdown question="What is your age group?"]
- Under 18
- 18-24
- 25-34
- 35-44
- 45-54
- 55+
[/dropdown][textarea question="Please provide detailed feedback:" required="false"]
[/textarea][number question="Rate this feature from 1-10:" min="1" max="10"]
[/number][star question="How would you rate your overall experience?"]
[/star][thumbs question="Would you recommend this to others?"]
[/thumbs]All field types support these attributes:
question: The question text (required)required: Whether the field must be filled (true/false, defaults totrue)min: Minimum value for number fieldsmax: Maximum value for number fields
[survey name="product-feedback" title="Product Feedback Survey"]
[radio question="How did you hear about us?"]
- Search engine
- Social media
- Friend recommendation
- Advertisement
- Other
[/radio]
[checkbox question="Which features are most important to you?"]
- Speed
- Security
- User interface
- Customer support
- Price
[/checkbox]
[dropdown question="How often do you use our product?"]
- Daily
- Weekly
- Monthly
- Rarely
[/dropdown]
[star question="Overall satisfaction rating:"]
[/star]
[number question="How likely are you to recommend us? (1-10)"]
[/number]
[textarea question="Any additional comments?" required="false"]
[/textarea]
[thumbs question="Would you purchase again?"]
[/thumbs]
[/survey][radio question="Choose your favorite animal:"]
- ๐ Cat
- ๐ถ Dog
- ๐ฆ Bird
- ๐ Fish
[/radio][radio question="Which <strong>programming language</strong> do you prefer?"]
- JavaScript
- Python
- Ruby
- Go
[/radio][survey name="mixed-survey"]
[radio question="What is your role?" required="true"]
- Developer
- Designer
- Manager
- Other
[/radio]
[textarea question="Any additional thoughts?" required="false"]
[/textarea]
[/survey]- Write your survey using the markdown syntax above
- Post it in any topic where you have posting permissions
- The survey will automatically appear as an interactive form
- Users can submit responses immediately
- Visit the topic containing the survey
- If not logged in, you'll be prompted to sign in when attempting to respond
- Fill out the required fields (optional fields can be skipped)
- Click "Submit" to save your response
- Once submitted, you'll see a confirmation message and cannot submit again
- Login Required: Anonymous users must log in before submitting responses
- One Response Per User: Each user can only submit one response per survey
- Topic Permissions: Users must have read access to the topic to view surveys
- Posting Permissions: Users must have posting permissions in the topic to submit responses
- Archived Topics: Surveys in archived topics cannot accept new responses
- Deleted Posts: Surveys in deleted posts are no longer accessible
- Only one survey is allowed per post
- Survey structure cannot be modified after receiving responses
- All survey field questions must be unique within a single survey
- Survey field questions cannot be blank
The plugin creates four main database tables:
surveys: Main survey recordssurvey_fields: Individual fields within surveyssurvey_field_options: Options for choice-based fieldssurvey_responses: User responses to survey fields
The plugin includes responsive CSS that adapts to your theme. Custom styling can be added by targeting these CSS classes:
.survey- Main survey container.survey-field- Individual field wrapper.field-[type]- Specific field type containers.submit-response- Submit button
If you have issues or suggestions for the plugin, please bring them up on Discourse Meta.