// These fields should be added before other user fields
constsystemBeforeFields: typeofbookingFields=[
{
defaultLabel:"your_name",
type:"name",
name:"name",
required: true,
sources:[
{
label:"Default",
id:"default",
type:"default",
},
],
},
{
defaultLabel:"email_address",
type:"email",
name:"email",
required: true,
sources:[
{
label:"Default",
id:"default",
type:"default",
},
],
},
{
defaultLabel:"location",
type:"radioInput",
name:"location",
required: false,
// Populated on the fly from locations. I don't want to duplicate storing locations and instead would like to be able to refer to locations in eventType.
// options: `eventType.locations`
optionsInputs:{
attendeeInPerson:{
type:"address",
required: true,
placeholder:"",
},
phone:{
type:"phone",
required: true,
placeholder:"",
},
},
sources:[
{
label:"Default",
id:"default",
type:"default",
},
],
},
];
// These fields should be added after other user fields
constsystemAfterFields: typeofbookingFields=[
{
defaultLabel:"additional_notes",
type:"textarea",
name:"notes",
required: additionalNotesRequired,
defaultPlaceholder:"share_additional_notes",
sources:[
{
label:"Default",
id:"default",
type:"default",
},
],
},
{
defaultLabel:"additional_guests",
type:"multiemail",
name:"guests",
required: false,
hidden: disableGuests,
sources:[
{
label:"Default",
id:"default",
type:"default",
},
],
},
{
defaultLabel:"reschedule_reason",
type:"textarea",
name:"rescheduleReason",
defaultPlaceholder:"reschedule_placeholder",
required: false,
sources:[
{
label:"Default",
id:"default",
type:"default",
},
],
},
];
constmissingSystemBeforeFields=[];
for(constfieldofsystemBeforeFields){
// Only do a push, we must not update existing system fields as user could have modified any property in it,
// Note: We still need workflows in `getBookingFields` due to Backward Compatibility. If we do a one time entry for all event-types, we can remove workflows from `getBookingFields`
// Also, note that even if Workflows don't explicity add smsReminderNumber field to bookingFields, it would be added as a side effect of this backward compatibility logic