Widget: Add an option to return the number of items left within the Appointment Slots widget

  • Profile Image
    Asked on October 03, 2017 at 07:34 PM

    When using the Appointment Slots widget and the widget is set to be REQUIRED, users won't be able to submit the form when all slots are already full because the field still requires a user input.

    One use case is to conditionally require the widget if there are slots left, and conditionally unrequire it when it's full.

    By adding an option to return the number of items left within the widget, the above conditional logic can be met.


    IF there are items left in the widget THEN REQUIRE the field

    IF there are no items left in the widget THEN UNREQUIRE it

    Or another way to approach this is - Instead of adding that feature, we should not require an input for the widget when all the slots are full. This way, even if it was setup to be a required field by default, the form can still be submitted if there are no items/slots left in the widget. In my opinion, this is a simpler method because there's no need to setup conditions to fulfill it.

    Here's an example form showing the problem when the widget is required and there are no items/slots left. The form below won't be submitted and the user will be stuck.