{-# LANGUAGE OverloadedStrings #-}import DevFormsmain :: IO ()main = devFormServer 9000 $ do form "An example form" "animalform" $ do questionLikert "This is an easy question to answer" questionChoice "Select the animal you like the most" [ "Alpaca" , "Bumblebee" , "Camel" , "Duck" ] questionMultiChoiceWith "Which animals have you seen?" [ "Alpaca" , "Bumblebee" , "Camel" , "Duck" ] $ do setMinSelections 1 :: MultiChoiceQuestionBuilder () setMaxSelections 3 questionDateWith "On which day would you like to meet your favourite animal?" $ setOptional questionTime "On which time would you like to have the meeting?" questionIntegerWith "How many siblings do you have?" $ do setLowerBoundInclusive 0 form "Another simple form" "otherform" $ do questionCheckbox "Do you want to check this box?" questionChoice "Select one of the following:" ["A", "B", "C"] questionMultiChoice "Select all that apply:" ["X", "Y", "Z"] questionDate "Select a date" questionIntegerWith "Enter a natural number" $ do setUpperBoundInclusive 15 questionFloatWith "Enter a float" (pure ()) questionLikert "This form works well" questionTime "Select a time" questionFreeTextWith "Any special requests?" $ setOptional questionRegexText "Enter five uppercase letters" "[A-Z]{5}"