Menu

#9383 RSForm!Pro plugin

Parent Category:
DPCalendar
Category:
Integration plugins
Last Updated:
Allon Moritz, Tuesday, 07 November 2023 13:27
Created:
Monday, 19 September 2022 07:11
Hits:
1725

This feature is part of the DPCalendar Professional subscription.
SubscribePHP 7.4PHP 8Joomla 3.10Joomla 4.4Joomla 5

Introduction

The RSForm!Pro plugin offers the possibility to add a booking calendar to any RSForm!Pro form in a simple way. A calendar panel and checkbox list do give the visitor a field where they can make a reservation on any kind of appointment. Use cases like a private yoga lessons or room reservations can be implemented easily.

Behind the scenes is the DPCalendar event system used. Like that has the admin full power of a stable event manager with all the DPCalendar configuration options, menu items, plugins and modules.

Setup

Before the plugin can be used, the site admin has to install it and on Extensions => Manage the System - RSForm!Pro DPCalendar plugin must be enabled. As a first step, a calendar needs to be created in DPCalendar where the reservations should be filled in.

Use it in the form

Once the calendar and form have been created and the plugin enabled, open the RSForm!Pro form in the back end. A new field in the left sidebar can be found, under the "Advanced Form Fields section", named "DPCalendar Reservation". Note that this field can be set up in the same ways as any of the other RSForm!Pro fields.

RSForm!Pro field type

Create a field

To create a field, click on the "DPCalendar Reservation" field type. A popup window will appear where the attributes of the DPCalendar reservation RSForm!Pro field can be entered. The following list documents attributes.

RSForm!Pro DPCalendar reservation field configuration

General Tab

  • Name:
    Name of the field. This is used internally to reference this field, like in the user-admin emails.
  • Caption:
    The caption appears on the form next to the field.
  • Item:
    The items/options which are needed the booking. Add one value per line, the value and a label can be separated with a pipeline character like on the screenshot. Read the RSForm!Pro documentation for more information. In our example, there is additional content in brackets, it's a RSForm!Pro feature to get prices [p{price}] when there is a payment form.
    The value must have the format "hours:minutes-hours:minutes" where the hours need to be in 24 format. This indicates the date range where the reservation should happen. For example "9:45-13:30|Morning session" defines that the reservation will happen from quarter to 10 am till half past 1 pm. The label on the list will then be "Morning session".
  • Description:
    Fill it if there is a need for an additional description of the field on the frontend of the site.
  • Published:
    Define if this field needs to be published or not. If not, it won't be displayed on the frontend form of the site.

Validations

  • Required:
    Define if this field is mandatory or not.
  • Validation message:
    If the field is required, it's the message displayed on the frontend when a visitor tries to submit the form without filling the field.

Attributes

  • Flow:
    How should the options be displayed.
  • Calendar ID:
    The ID of the calendar which is displayed in the form and where the events should be created in for the submissions. To find the ID of the reservation calendar, navigate to Components => DPCalendar => Calendars. The ID is displayed at the very right, under the ID column.
  • Calendar ID's to check:
    A comma separated list of the calendar ID's that should be used to check if there is a free slot available. If this value is empty, the calendar ID from the setting above is used. To find the ID of the reservation calendars, navigate to Components => DPCalendar => Calendars. The ID is displayed at the very right, under the ID column.
  • Min Date (relative or absolute):
    The minimum date where selections can be made. The calendar doesn't allow to navigate before the date and the day cells are greyed out and are not selectable. Options which are before the date can't be selected. The parameter can be an absolute date like '2023-12-31' or a relative one like '+14 days'. It defaults to 'now' means that no selections can be done in the past.
  • Max Date (relative or absolute):
    The maximum date where selections can be made. The calendar doesn't allow to navigate past the date and the day cells are greyed out and are not selectable. Options which are after the date can't be selected. The parameter can be an absolute date like '2023-12-31' or a relative one like '+14 days'. There is no default date, means there is no restriction till when options can be selected.
  • Event Title Field Name:
    The name of another field in the same form which should be used as event title. This is handy to distinguish the different submissions in DPCalendar. For example you can create a hidden field in the form and add as default value some code like {global:fullname} or
    //<code>
    return \Joomla\CMS\Factory::getUser()->name;
    //</code>
  • Event Access:
    The access level group that is allowed to view this item. More information can be found in the ACL article.
  • Event Access Content:
    Which user should see the content of the event. This means if the user has no access permissions, a text "busy" will be displayed on the frontend. More information can be found in the ACL article.
  • Additional Attributes: Here can the admin add additional attributes like custom CSS or Javascript code. Please check RSForm!Pro documentation for more information about additional attributes.

Usage in mails

RSForm!Pro allows to use the field values in submission mails like "{Times:value}" when you have a field with the name "Times". Beside the normal values from RSForms!Pro, DPCalendar offers the additional placeholders:

  • start_date
    The raw start date as stored in the database.
  • end_date
    The raw end date as stored in the database.
  • start_date_formatted
    The start date formatted with the event date/time format parameter from the global DPCalendar options in the user timezone.
  • end_date_formatted
    The end date formatted with the event date/time format parameter from the global DPCalendar options in the user timezone.
  • date_range
    The start and end date as range like in the event details view.

Front end submission

When the form is opened on the front end, either by menu link or integrated in an article, then are the booking calendar and linked options displayed. The blue cells do highlight the selected dates and the green one is the current selection. On the right side are the options rendered the visitor can select from. When there is an event already at that time range, then the option is disabled. The booking calendar takes any event into consideration, not only the selected options from previous submissions.

DPCalendar compares the start and end date of existing events, when there is an event found which overlaps with a slot, then the slot is not selectable. Does a slot start or end where a new one ends or begins, then it is possible to select it. So for example when the admin has defined the following three slots:

  • 13:30 - 14:15|Slot 1
  • 14:15 - 15:00|Slot 2
  • 15:00 - 15:45|Slot 3

And the visitor selects the middle slot, then it is still possible to select the slot on or three.

Once the visitor posts a submission all the submission data is stored in the description of the event. Like that can an admin easily work on further callbacks and is well prepared when the event happens.

RSForm!Pro DPCalendar reservation front end submission

Comments (0)

We use cookies on our website. Some of them are essential for the operation of the site, while others help us to improve this site and the user experience (tracking cookies). You can decide for yourself whether you want to allow cookies or not. Please note that if you reject them, you may not be able to use all the functionalities of the site.