Feature Request: Allow configuring field type and placeholder for freeform text survey questions

Open
#33,259 2 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Stale
Tech stack
python
Domain
api, backend

Research direction

Start by tracing the PostHog API survey freeform-question configuration and the response path that currently exposes the description field. Confirm how question configuration is stored and returned, then verify that field_type and placeholder are available to the frontend without description encoding; the issue names no files or tests, so those entry points must be located first.

Written by the indexing model from the issue text.

Description

enhancement feature/surveys
Feature request

Is your feature request related to a problem?

When creating freeform text questions in PostHog API surveys, we currently have no way to specify the input field type (input vs textarea) or a placeholder. This creates challenges for rendering the correct UI on the frontend. As a workaround, we're encoding this data into the optional description field, but that's not ideal or scalable.

Describe the solution you'd like

We’d like support for two additional configuration options on freeform text questions:

  1. A field_type setting, with values like input or textarea.
  2. A placeholder field to display placeholder text in the input.

These could be stored alongside the question config and surfaced in the survey API response.

Describe alternatives you've considered

We’ve been embedding metadata like type:textarea;placeholder:Leave feedback... into the description field and parsing it manually, but this is fragile and not officially supported.

Additional context

From: https://posthoghelp.zendesk.com/agent/tickets/32003 (moved to PostHog: https://us.posthog.com/project/2/support/tickets/33822)

Debug info
Kind: feedback

Target area: surveys

Report event: http://go/ticketByUUID/3759b895-0d6c-456e-8385-a0e2cd463443

Session: https://us.posthog.com/project/sTMFPsFhdP1Ssg/replay/01973fce-f55e-7294-ba65-407a74655cf9?t=1924

Exceptions: https://us.posthog.com/project/2/error_tracking?filterGroup=%7B%22type%22%3A%22AND%22%2C%22values%22%3A%5B%7B%22type%22%3A%22AND%22%2C%22values%22%3A%5B%7B%22key%22%3A%22%24session_id%22%2C%22value%22%3A%5B%2201973fce-f55e-7294-ba65-407a74655cf9%22%5D%2C%22operator%22%3A%22exact%22%2C%22type%22%3A%22event%22%7D%5D%7D%5D%7D

Location: https://us.posthog.com/project/18742/surveys/019704bc-26e0-0000-1ec3-2acea791b10f?edit=true

Persons-on-events mode for project: person_id_override_properties_joined
Dominant language
Python
Stars
39.9k
Forks
3.4k
Avg merge
7h 27m
Merged PRs (30d)
222

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.

More from PostHog/posthog

All issues in PostHog/posthog

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.