Skip to content

Commit

Permalink
feat(surveys): optional questions for multipleq (#17830)
Browse files Browse the repository at this point in the history
  • Loading branch information
liyiy authored and daibhin committed Oct 23, 2023
1 parent 2631f29 commit 98f0b9f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
8 changes: 8 additions & 0 deletions frontend/src/scenes/surveys/Survey.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,14 @@ export function SurveyForm({ id }: { id: string }): JSX.Element {
]}
/>
</Field>
{survey.questions.length > 1 && (
<Field name="optional" className="my-2">
<LemonCheckbox
label="Optional"
checked={!!question.optional}
/>
</Field>
)}
<Field name="question" label="Question">
<LemonInput value={question.question} />
</Field>
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2159,7 +2159,7 @@ export interface SurveyAppearance {
export interface SurveyQuestionBase {
question: string
description?: string | null
required?: boolean
optional?: boolean
}

export interface BasicSurveyQuestion extends SurveyQuestionBase {
Expand Down

0 comments on commit 98f0b9f

Please sign in to comment.