PostHog / PostHog/posthog-flutter

Support auto-submit on selection (skipSubmitButton)

Open
#262 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement Survey
Dominant language
Dart
Stars
97
Forks
85
Avg merge
1d 8h
Merged PRs (30d)
31

Description

🚨 IMPORTANT

This issue is likely user-facing in the main PostHog app, see surveyVersionRequirements.ts. If you delete or close this issue, be sure to update the version requirements list here.

Summary

The Flutter SDK does not support the skipSubmitButton feature for surveys. This feature allows single-choice, multiple-choice, and rating questions to automatically submit when a selection is made, without requiring the user to press a submit button.

Current State

  • Flutter delegates survey functionality to native iOS/Android SDKs
  • Neither native SDK currently supports skipSubmitButton

Expected Behavior

When a question has skipSubmitButton: true:

  • For single-choice questions: submit automatically when an option is selected
  • For rating questions: submit automatically when a rating is selected
  • The submit button should be hidden for these questions

Dependencies

This feature requires implementation in the underlying native SDKs first:

Once native SDKs support this feature, Flutter will need to:

  1. Update minimum native SDK version requirements in ios/posthog_flutter.podspec and android/build.gradle
  2. Update the Flutter survey widgets to handle auto-submission behavior

Reference Implementation

See posthog-js browser: packages/browser/src/extensions/surveys/components/QuestionTypes.tsx

Tracking

This is tracked in the survey SDK feature parity issue: https://github.com/PostHog/posthog/issues/45658

This issue was generated by Claude during a Surveys SDK audit.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the linked iOS and Android issues, since this Flutter work depends on native SDK support. Then review ios/posthog_flutter.podspec, android/build.gradle, the Flutter survey widgets, and the browser reference in packages/browser/src/extensions/surveys/components/QuestionTypes.tsx. Done means the minimum native versions and Flutter behavior support automatic submission and hide the submit button for the specified question types.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, dart, flutter, ios
Domain
mobile-dev
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.