diff --git a/apps/web/components/eventtype/EventAdvancedTab.tsx b/apps/web/components/eventtype/EventAdvancedTab.tsx index a9f74d6c0c..3ac5f6e2dd 100644 --- a/apps/web/components/eventtype/EventAdvancedTab.tsx +++ b/apps/web/components/eventtype/EventAdvancedTab.tsx @@ -5,6 +5,7 @@ import { useEffect, useState } from "react"; import { Controller, useFormContext } from "react-hook-form"; import short from "short-uuid"; import { v5 as uuidv5 } from "uuid"; +import { z } from "zod"; import type { EventNameObjectType } from "@calcom/core/event"; import { getEventName } from "@calcom/core/event"; @@ -16,6 +17,7 @@ import { allowDisablingHostConfirmationEmails, } from "@calcom/features/ee/workflows/lib/allowDisablingStandardEmails"; import { FormBuilder } from "@calcom/features/form-builder/FormBuilder"; +import { EditableSchema } from "@calcom/features/form-builder/FormBuilderFieldsSchema" import { BookerLayoutSelector } from "@calcom/features/settings/BookerLayoutSelector"; import { classNames } from "@calcom/lib"; import { APP_NAME, CAL_URL } from "@calcom/lib/constants"; @@ -85,6 +87,7 @@ export const EventAdvancedTab = ({ eventType, team }: Pick }; } return field; diff --git a/packages/features/form-builder/FormBuilder.tsx b/packages/features/form-builder/FormBuilder.tsx index c101476f5a..dd25814ace 100644 --- a/packages/features/form-builder/FormBuilder.tsx +++ b/packages/features/form-builder/FormBuilder.tsx @@ -299,8 +299,9 @@ export const FormBuilder = function FormBuilder({ const fieldType = FieldTypesMap[field.type]; const isRequired = field.required; const isFieldEditableSystemButOptional = field.editable === "system-but-optional"; + const isFieldEditableSystemButHidden = field.editable === "system-but-hidden"; const isFieldEditableSystem = field.editable === "system"; - const isUserField = !isFieldEditableSystem && !isFieldEditableSystemButOptional; + const isUserField = !isFieldEditableSystem && !isFieldEditableSystemButOptional && !isFieldEditableSystemButHidden; if (!fieldType) { throw new Error(`Invalid field type - ${field.type}`); @@ -368,7 +369,7 @@ export const FormBuilder = function FormBuilder({ {field.editable !== "user-readonly" && !disabled && (
- {!isFieldEditableSystem && !disabled && ( + {!isFieldEditableSystem && !isFieldEditableSystemButHidden && !disabled && (