PostHog / PostHog/posthog-android

Support auto-submit on selection (skipSubmitButton)

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

Nobody has claimed this yet.

enhancement Survey
Dominant language
Kotlin
Stars
90
Forks
49
Avg merge
2d 5h
Merged PRs (30d)
61

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 Android 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

  • The skipSubmitButton field is not present in RatingSurveyQuestion, SingleSurveyQuestion, or MultipleSurveyQuestion classes in SurveyQuestion.kt
  • Since Android uses a delegate pattern, integrators building custom UIs cannot access this field

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

Implementation Notes

Since Android uses a delegate pattern without built-in UI:

  1. Add skipSubmitButton: Boolean? field to relevant question classes in posthog/src/main/java/com/posthog/surveys/SurveyQuestion.kt
  2. Update PostHogDisplaySurveyQuestion to expose this field to integrators
  3. Document the expected behavior for integrators building custom UIs

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 posthog/src/main/java/com/posthog/surveys/SurveyQuestion.kt and trace how PostHogDisplaySurveyQuestion exposes question fields to custom UI integrators. Compare the browser behavior in packages/browser/src/extensions/surveys/components/QuestionTypes.tsx, then verify that single-choice and rating selections can expose skipSubmitButton and that integrators have enough information to hide the submit button and auto-submit.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, kotlin
Domain
mobile
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.