Hotel Booking Form
A hotel booking form allows guests to make a reservation at a hotel. Hotel booking forms typically include fields for information related to the guest's stay: name, contact details, identification documents, reservation details, payment information, etc. This demo shows a ready-to-use hotel booking form, which was created and designed using SurveyJS Survey Creator with integrated Theme Editor. The following sections highlight key aspects of the form implementation.
Form fields can be framed by panels or displayed without them. This demo uses the panelless view. To enable it in Theme Editor, switch the General > Question appearance editor to "Without Panels". This editor is mapped to the
isPanelless property in the theme JSON configuration (see the
The hotel booking form in this demo has a distinct background image. With Theme Editor by SurveyJS, you can add background images to your forms with ease. Open the Themes tab in Survey Creator and expand the Background category. Editors under the Background image title enable you to add a background image and configure its every aspect.
These editors are mapped to the following theme JSON schema properties, which you can find in the
An image to display as form background. This property accepts a hyperlink or a data URL.
A string value that specifies how to resize the background image to fit it into its container. Refer to the description of the
background-sizeCSS property values on MDN for detailed information on the possible values.
A string value that specifies whether the background image is fixed in its position (as in this demo) or scrolled along with the survey.
A value from 0 to 1 that specifies how transparent the background image should be: 0 makes the image completely transparent, and 1 makes it opaque. In Theme Editor, the opacity values are mapped to a scale from 0% to 100%.
The header of your form typically contains a form title, short description, and a logo of your company. To specify title and description texts, open the Designer tab and enter them in the Title and Description editors in the General category. To configure a logo, use editors in the Logo in Survey Header category.
These editors are mapped to the following survey JSON properties:
To configure the appearance of the form header, open the Themes tab and use editors in the Header category. Ensure that the View switch is set to "Advanced". All editors in the Header category, except font editors and View, are mapped to corresponding
header object properties in the theme JSON schema (see the
If you want to design more compact and neat-looking forms, you can hide form field titles and display title texts as input field placeholders. To implement this layout in your form, open the Designer tab, select a question on the design surface, and specify the following settings:
- In the General category, enter the form field title in the Input area placeholder editor.
- In the Layout category, change Title location to "Hidden".