Menu

#618 Menu item event form

Parent Category:
DPCalendar
Category:
Menu items
Last Updated:
Allon Moritz, Wednesday, 24 January 2024 12:04
Created:
Wednesday, 22 February 2012 10:15
Hits:
8673

DownloadPHP 7.4PHP 8Joomla 3.10Joomla 4.4Joomla 5

Introduction

The Create Event menu item shows an event creation form allowing permitted users to create events from the frontend of your Joomla calendar. If the logged in user has no edit state rights, the events must be approved and published by an administrator.

One of the most important features is the series definition, where the author can define a recurring pattern for events. All these instances will be then copies of the original event. If an original event of a series is edited and some instances have been manipulated individually, a popup is shown which asks you if you want overwrite these changes. When denied, then only the instances which are identical to the original event are overwritten with the data from the original event. More about series can be found in the Event Management article.

Event form

Reuse old event

If you create a new event and start typing the title a drop down list is displayed with events which do have a similar title. If the author clicks then on such an entry, then the page is loaded with the values from that event. It is basically an instant copy feature.

Event instant copy

Overlapping check

It is possible to activate an overlapping check in the event form options. If this option is activated, every time when the date is changed of the event a check is done if there is another event in the same calendar within the same time range. When an existing event ends on the start time in the form, then it is possible to create an event, as the overlapping check is exclusive. If there is one a warning is displayed. Additionally you can set the parameter to "Disabled save" which deactivates the save buttons.

If the check is enabled you have also the option to include location and room checks, means it checks additionally if the location and rooms of the events do overlap.

Event overlapping

Fixed color list

You can define a list of colors in the DPCalendar options for event editing. This means that users can choose from a fixed list of colors while manipulating an event. It is then not possible anymore to choose another color.

Event form colors

Change the order of fields

When there is a need to change the order of the fields for the event form, then use the flat mode setting in the DPCalendar options in the event form tab. Once enabled, there are no event tabs displayed in the front form and a subform appears below the setting in the configuration to define the order of the fields.

This setting works only for the front end and allows the admin to create simple forms for the average user without any complex attributes. With different menu items it is also possible to show different forms then for different user groups, like that power users can have more settings available.

Event fields order

Disable fields

It is possible to disable fields or whole tabs that they will not be visible for the user who is editing an event. These settings can be controlled in the menu item or global DPCalendar options and are ignored on the back end as there should be all fields and tabs visible. It allows the admin to create very simple front end forms together with the flat mode.

Event form disabled fields

Author field override

The author field is an user list. In the back end it opens the user list view. On the front this view is not available so the raw user list is displayed. To achieve that you have to create a layout override by coping the file /components/com_dpcalendar/layouts/form/author.php to /templates/{{your template}}/html/layouts/com_dpcalendar/form/author.php. For example when you want to use a specific custom field, then you can use the following query (replace 33 with the ID of your specific custom field):

<?phpdefined('_JEXEC') or die();echo "select u.id as value, concat(ifnull(f.value, ''), ' ', u.name) as text from #__users u left join #__fields_values f on u.id = f.item_id and f.field_id = 33 union all select '', '' order by text";

Location handling

An event can be attached to multiple locations. If the locations have also rooms, then you can assign the event to a specific room of the selected locations.

The location lookup field offers the possibility to create new locations on the fly. If a location doesn't exist, the author can search in the maps provider database for the location and assign it to the event. When saving the event, the location will be created then automatically in DPCalendar.

Event form locations

Options

The settings can be configured globally in the DPCalendar options or per menu item. If the value is empty in the menu item, then it will be inherited from the global options.

Flat Mode [Type: Radio] [Default: No]
Should the form be shown with tabs or in flat mode.
The following options are available:
  1. Yes
  2. No
Field Order [Type: Subform]
The order of the fields. The ones which are not listed, will be appended at the end.
Date Format [Type: Text] [Default: d.m.Y]
The format of the date in a form (check http://www.php.net/date for details).
Time Format [Type: Text] [Default: H:i]
The format of the time in a form (check http://www.php.net/date for details).
Time Step [Type: Text] [Default: 30]
The steps in the timepicker in minutes.
Min Time [Type: Text]
The minimum time the event can have. Must be in format 06:30.
Max Time [Type: Text]
The maximum time the event can have. Must be in format 22:00.
Check Overlapping [Type: List] [Default: No]
Check if there are overlapping events with the date settings.
The following options are available:
  1. Warning message only
  2. No
  3. Disable save
Check Locations [Type: Radio] [Default: No]
Also check if the locations and rooms are the same.
The following options are available:
  1. Yes
  2. No
Show Map [Type: Radio] [Default: Yes]
Should a map be shown.
The following options are available:
  1. Yes
  2. No
Map Zoom [Type: Text] [Default: 10]
The initial zoom level of the map.
Map Width [Type: Text] [Default: 100%]
The width of the map.
Map Height [Type: Text] [Default: 250px]
The height of the map.
Map Latitude [Type: Text] [Default: 47]
The initial latitude of the map.
Map Longitude [Type: Text] [Default: 4]
The initial longitude of the map.
Hidden Tabs [Type: List]
Tabs which should be hidden in the form on the front end.
The following options are available:
  1. Location
  2. Booking
  3. Publishing
  4. Images
  5. Options
  6. Metadata
Hidden Fields [Type: List]
Fields which should be hidden in the form on the front end.
The following options are available:
  1. Calendar
  2. Colour
  3. Url
  4. All Day
  5. Show End Time
  6. Scheduling
  7. Description
  8. Schedule
  9. Locations
  10. Rooms
  11. Location lookup
  12. Capacity
  13. Tickets Booked
  14. Max Tickets
  15. Opening Date
  16. Closing Date
  17. Cancel Closing Date
  18. Book Series
  19. Waiting List
  20. Prices
  21. Earlybird Discount
  22. User Group Discount
  23. Options
  24. Payment Provider
  25. Terms Article
  26. Assign To Group
  27. Booking Information
  28. Alias
  29. Tags
  30. Featured
  31. Hits
  32. Status
  33. Access
  34. Access content
  35. Language
  36. Created Date
  37. Author
  38. Author's Alias
  39. Hosts
  40. Modified Date
  41. Modified By
  42. Start Publishing
  43. Finish Publishing
  44. Version Note
  45. XReference
  46. Intro Image
  47. Alt Image Text
  48. Image Caption
  49. Full Image
  50. Alt Image Text
  51. Image Caption
  52. Keywords
  53. Meta Description
  54. Robots
  55. Content Rights
Calendars [Type: Dpcalendar]
The list of available calendars to create the event in. The user must have the proper create/edit permission too that they get listed.
Redirect [Type: Modal_article]
The article where should be redirected after submission when no return url is given.
Calendar [Type: Dpcalendaredit]
The calendar this event belongs to.
The following options are available:
Show End Time [Type: List]
Should the end time be shown. It still requires an end time set for export.
The following options are available:
  1. Yes
  2. No
All Day [Type: List]
If the event is an all day event.
The following options are available:
  1. Yes
  2. No
Colour [Type: Color]
The colour of the event. If it is empty the event will be displayed with the color of the calendar.
Colour Options [Type: Subform]
If specified, the user can choose between the preset, otherwise any colour.
Url [Type: Url]
The url, if it is an external one add https:// at the beginning.
Access [Type: Accesslevel]
The access level group that is allowed to view this item.
The following options are available:
Access content [Type: Accesslevel]
Which user should see the content of the event. This means if the user has no access right a busy text will be displayed.
The following options are available:
Description [Type: Editor]
Enter a description for the event.
Featured [Type: List]
Assign the event to the featured list of events.
The following options are available:
  1. No
  2. Yes
Locations [Type: Sql]
The locations of the event.
Language [Type: Contentlanguage]
Assign a language to this event.
The following options are available:
  1. All
Capacity [Type: Text]
Defines how many attendees are allowed on this event. Zero means that the whole booking feature is disabled. If the value is empty there are unlimited tickets available.
Max Tickets [Type: Text]
Defines the maximum tickets a user can have. This setting works across different bookings. For example when the setting has the value 4 and a user has already booked two tickets, then on the next booking only two tickets can be booked.
Opening Date [Type: Text]
When bookings are allowed. Can be an absolute date like 2022-08-18 or relative like '-2 days'.
Closing Date [Type: Text]
When no more bookings are allowed. Can be an absolute date like 2022-08-18 or relative like '-2 days'. If it is empty, then the start date of the event is the closing date.
Cancel Closing Date [Type: Text]
The date till when bookings can be cancelled or deleted. Can be an absolute date like 2022-08-18 or relative like '-2 days' to the event start date. If it is empty, then the start date of the event is the cancel closing date.
Book Series [Type: List]
Should the visitor be able to book only the whole series.
The following options are available:
  1. No
  2. Option
  3. Yes
Waiting List [Type: List]
Should the waiting list be enabled.
The following options are available:
  1. No
  2. Yes
Payment Provider [Type: Dppaymentprovider]
Select one or many payment providers which should be used for payments of this event.
Terms Article [Type: Modal_article]
Link to terms and condition article.
Booking Information [Type: Editor]
The booking information.
Custom CSS [Type: Textarea]
Custom CSS code which will be added to the HTML document.

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.