How to calculate the day of the week?

You can use the getDay() function to find the day of the week for a specified date. This function returns a number from 0 to 6 representing each day of the week from Sunday to Saturday respectively.

You can use the getDay() function to find the day of the week for a specified date. This function returns a number from 0 to 6 representing each day of the week from Sunday to Saturday respectively.

Restaurant order form: cycle menu

Let's take the example of a restaurant that offers a cycle menu where there items change based on the day of the week. Instead of creating multiple order forms, one for each day of the week, you can create one order form with separate sections for each day of the week and use Date calculations to show only the relevant menu based on the day of the week. Please follow the instructions below.

Step 1: Add a multiple choice question with 0, 1, 2, 3, 4, 5 and 6 as answer choices. Enable Go to section based on answers option and map each of the answer choices to the respective daily menu as shown below. 0 = Sunday menu, 1 = Monday menu and so on.
Step 2: Click on the Addon icon > Select Formfacade > Select Customize this form > Click on the Proceed button.
In the Formfacade customize interface, click on the ⚙️icon next to the multiple choice question.
Step 3: Field settings screen will be displayed. Select the "Answer" tab and write the formula to automatically select the day of the week.

Use getDay() function to calculate the day of the week

getDay() function returns the day of the week for a specified date. This function returns a number from 0 to 6 representing each day of the week from Sunday to Saturday respectively. To determine the day of the week for the current date, we can use the below formula.

TODAY().getDay()

Step 4: Write the TODAY().getDay() formula in the Calculate option as shown below.
Step 5: The only purpose of this question is to navigate to the correct daily menu for the day without user's input. Since we are automatically calculating the day of the week, we can hide this question by changing the appearance to hidden as shown below.
Made with formfacade