Skip to main content

formShape

Description

Optional. An array of objects containing settings for managing the appearance and functionality of the Reservation editor

Usage

formShape?: [
{
type: "text" | "area",
name: string,
label: string,
}
];

Parameters

For each field you can specify the following parameters:

  • type - (optional) the field type (text or area)
  • name - (optional) the field name
  • label - (optional) the field label

Default config

const defaultFormShape = {
...
};

Example

const formShape = [
{
type: "text",
name: "name",
label: "Name",
},
{
type: "text",
name: "email",
label: "eMail",
},
{
type: "area",
name: "description",
label: "Details",
},
];

new booking.Booking("#root", {
formShape,
// other parameters
});

Related articles: