Event scheduling with calendar | XM Community
Skip to main content

Hello,

 

I need to build an event registration/scheduling site similar to Calendly. The catch? I cannot use any code or widget other than Qualtrics.

 

I would like the instrument to include the following features:

  • Calendar interface: There are 30 different (non-consecutive) dates that users could sign up on. A matrix would be just too messy.
  • Multiple 30 minute slots for each date. For instance, Monday 1: 9:00 to 9:30; 9:30 to 10:00; etc.
  • Limit the number of people that can sign up for each slot. This has to be customizable: up to 5 people can sign up for the first slot, next one just 3, and so on.
  • Users receive a confirmation email after signing up.
  • BONUS: Users also receive a reminder 3 hours before the slot they signed up for is up.

 

Thank you very much. I know this is a tough one.

 

Best,

Hey @QualtricsDude 

To achieve these features in Qualtrics, you can use Embedded Data, JavaScript, and Email triggers. Here's a high-level overview of how you can implement each feature:

 

1. **Calendar Interface**: Use a custom HTML/JavaScript to create a calendar interface with buttons or clickable elements for each date. Upon selection, update embedded data with the chosen date.

 

2. **Multiple 30-minute Slots**: Similar to the calendar interface, use JavaScript to dynamically generate time slots for each selected date. Allow users to select their preferred time slot, updating embedded data accordingly.

 

3. **Limit Number of Sign-ups**: Implement logic in JavaScript to track the number of sign-ups for each time slot. Disable slots or display availability based on the customizable limit.

 

4. **Confirmation Email**: Utilize Qualtrics Email triggers to send a confirmation email upon successful sign-up. You can include relevant details such as the selected date and time slot in the email content.

 

5. **Reminder Email**: Set up another Email trigger to send a reminder email 3 hours before the selected time slot. This trigger can be based on the date and time stored in embedded data.

 

For the bonus feature, you'll need to create a new email trigger that fires 3 hours before the selected time slot and includes a reminder message.

 

Hope this clears


 JavaScript code that you can use to implement the calendar interface, dynamic time slots, and limit the number of sign-ups for each slot. Please note that this code is a simplified version and may need adjustments based on your specific requirements and the structure of your Qualtrics survey:

________________________________________________

Qualtrics.SurveyEngine.addOnload(function() {

    // Define available dates and time slots

    var availableDates = e"Date 1", "Date 2", "Date 3"]; // Add your available dates here

    var timeSlots = {

        "Date 1": "9:00 - 9:30", "9:30 - 10:00", "10:00 - 10:30"], // Add time slots for each date

        "Date 2": "9:00 - 9:30", "9:30 - 10:00", "10:00 - 10:30"],

        "Date 3": "9:00 - 9:30", "9:30 - 10:00", "10:00 - 10:30"]

    };

 

    // Initialize variables to store selected date and time slot

    var selectedDate = "";

    var selectedTimeSlot = "";

 

    // Function to update selected date

    function updateSelectedDate(date) {

        selectedDate = date;

    }

 

    // Function to update selected time slot

    function updateSelectedTimeSlot(slot) {

        selectedTimeSlot = slot;

    }

 

    // Function to handle slot selection

    function handleSlotSelection(date, slot) {

        updateSelectedDate(date);

        updateSelectedTimeSlot(slot);

        // Update embedded data fields with selected date and time slot

        Qualtrics.SurveyEngine.setEmbeddedData("SelectedDate", selectedDate);

        Qualtrics.SurveyEngine.setEmbeddedData("SelectedTimeSlot", selectedTimeSlot);

    }

 

    // Generate calendar interface

    var calendarDiv = document.getElementById("calendar"); // Replace "calendar" with the ID of your calendar element

    availableDates.forEach(function(date) {

        var dateButton = document.createElement("button");

        dateButton.textContent = date;

        dateButton.addEventListener("click", function() {

            // Generate time slots for the selected date

            var slots = timeSlotsdate];

            var slotsDiv = document.getElementById("timeSlots"); // Replace "timeSlots" with the ID of your time slots element

            slotsDiv.innerHTML = ""; // Clear previous slots

            slots.forEach(function(slot) {

                var slotButton = document.createElement("button");

                slotButton.textContent = slot;

                slotButton.addEventListener("click", function() {

                    handleSlotSelection(date, slot);

                });

                slotsDiv.appendChild(slotButton);

            });

            updateSelectedDate(date);

        });

        calendarDiv.appendChild(dateButton);

    });

});

 

________________________________________________

This JavaScript code does the following:

 

1. Defines available dates and time slots.

2. Initializes variables to store the selected date and time slot.

3. Provides functions to update the selected date and time slot.

4. Generates a calendar interface with buttons for each available date.

5. Upon selecting a date, generates time slots for that date and allows the user to select a time slot.

6. Updates embedded data fields with the selected date and time slot.

 

You need to replace "calendar" and "timeSlots" with the IDs of your calendar and time slots elements in your Qualtrics survey. Additionally, customize the available dates and time slots according to your requirements.

 

Let me know if you need further assistance!

Please mark my answer if you got your answer :)


Leave a Reply