feat: adds hidden field functionality to surveys (#1144)

Co-authored-by: Johannes <72809645+jobenjada@users.noreply.github.com>
Co-authored-by: Matthias Nannt <mail@matthiasnannt.com>
This commit is contained in:
Ronit Panda
2023-10-15 22:54:12 +05:30
committed by GitHub
parent ac12e37786
commit a71ad7c15e
16 changed files with 448 additions and 37 deletions
+3 -1
View File
@@ -1,8 +1,9 @@
import { TActionClassNoCodeConfig } from "@formbricks/types/v1/actionClasses";
import { TIntegrationConfig } from "@formbricks/types/v1/integrations";
import { TResponsePersonAttributes, TResponseData, TResponseMeta } from "@formbricks/types/v1/responses";
import { TResponseData, TResponseMeta, TResponsePersonAttributes } from "@formbricks/types/v1/responses";
import {
TSurveyClosedMessage,
TSurveyHiddenFields,
TSurveyProductOverwrites,
TSurveyQuestions,
TSurveySingleUse,
@@ -21,6 +22,7 @@ declare global {
export type ResponsePersonAttributes = TResponsePersonAttributes;
export type SurveyQuestions = TSurveyQuestions;
export type SurveyThankYouCard = TSurveyThankYouCard;
export type SurveyHiddenFields = TSurveyHiddenFields;
export type SurveyProductOverwrites = TSurveyProductOverwrites;
export type SurveyClosedMessage = TSurveyClosedMessage;
export type SurveySingleUse = TSurveySingleUse;
@@ -0,0 +1,2 @@
-- AlterTable
ALTER TABLE "Survey" ADD COLUMN "hiddenFields" JSONB NOT NULL DEFAULT '{"enabled": false}';
+3
View File
@@ -240,6 +240,9 @@ model Survey {
/// @zod.custom(imports.ZSurveyThankYouCard)
/// [SurveyThankYouCard]
thankYouCard Json @default("{\"enabled\": false}")
/// @zod.custom(imports.ZSurveyHiddenFields)
/// [SurveyHiddenFields]
hiddenFields Json @default("{\"enabled\": false}")
responses Response[]
displayOption displayOptions @default(displayOnce)
recontactDays Int?
+1
View File
@@ -9,6 +9,7 @@ export { ZResponseData, ZResponsePersonAttributes, ZResponseMeta } from "@formbr
export {
ZSurveyQuestions,
ZSurveyThankYouCard,
ZSurveyHiddenFields,
ZSurveyClosedMessage,
ZSurveyProductOverwrites,
ZSurveyVerifyEmail,