Reducing the need to enter booking questions multiple times

In 2022, BookIt developed a new set of gadget parameters to simplify booking questions for customers.   The requirement was "when adding to the cart, if the question has already been answered in the cart, don't ask it at all"

To turn these features on, add these settings in the Cart gadget JS initialisation options:

autoFillQuestionsAlreadyAsked: true,
hideQuestionsAlreadyAsked: true,

(these values each default to false if not specified)

 

Notes

A question is considered the 'same' if, within BookIt, the getOperatorBookingQuestions matches, specifically if the following holds true:

- the Name (i.e. the question prompt) matches (case insensitive, all spaces removed), AND
- the Values (i.e. the valid list options) matches (case insensitive, all spaces removed), AND
- the Type (i.e. the question type, TEXT, DROPDOWNLIST, etc) matches (case insensitive), AND
- the ValuesType (i.e. the data type of the list options) matches (case insensitive, for a TEXTBOX type, "TEXT" is considered to match "")

The autoFill logic will attempt to match Per Pax questions first, then per Booking (non-pax) questions,
for example, if you are adding to cart a question for say Adult 1 - "First Name", the logic will for the first matching Adult 1 - "First Name" question already in the cart. If no match is found, it will then just look for the first non-pax "First Name" to match.

BookIt reference: #17813