Add an iCalendar to your Ninja Forms.
Prerequisite:
- PHP 7.4-8.x
- Ninja Forms
You know the drill:
- Download the plugin
- Upload the plugin via
Plugins->Add New->Upload
- Activate the plugin.
- Use Ninja Forms to add the iCalendar.
- Link (
{ical:link}
), adds a<a href=".../event-xyz.ics">Add the event to your calendar</a>
link. The "Add the event to your calendar" text can be changed in iCalendar settings. - URL (
{ical:url}
), addshttp[s]://yoursite.tld/event-xyz.ics
Require Ninja Forms Conditional Logic to be enabled.
Per condition
- add an iCalendar
- add a response.
See example below
BEGIN:VCALENDAR
PRODID:-//eluceo/ical//2.0/EN
VERSION:2.0
CALSCALE:GREGORIAN
BEGIN:VEVENT
UID:1f09c1aca9cca3bcee4b588ab0bc624d
DTSTAMP:20240322T082413Z
SUMMARY:Launch Party!
DESCRIPTION:Welcome to our Launch Party!
URL:http://domain.local/party/
DTSTART:20240606T090000Z
DTEND:20240606T150000Z
LOCATION:Vippa\, Oslo
GEO:59.901864;10.741167
X-APPLE-STRUCTURED-LOCATION;VALUE=URI;X-ADDRESS=Vippa\, Oslo;X-APPLE-RADIUS
=49;X-TITLE=:geo:59.901864,10.741167
ORGANIZER:mailto:party@domain.local
END:VEVENT
END:VCALENDAR
I've created a date range add-on for Ninja Forms.
- Create the calendar using Eluceo\iCal
- multiline message
- link to event page
- add event location, inclusive latitude and longitude
- attach calendar to email confirmation
- Update translation file.
- Add Norwegian translation
- Update dependencies
- Housekeeping
- PHPStan it.
- Enable conditional logic for the iCalendar.
- Note, this is a breaking change. You can now select a date range and a time range.
- Remove incompatible attribute.
- Rename method in
include/js/actions.js
- Set default title in vcalendar
- Mark mandatory settings
- Refactor away from anonymous class.
- Refactor, move create VCALENDAR to card() in class Invitation.
- Update translation file.
- Rename methods in JavaScript
- Lint JavaScript using Rome
- Remove wp_localize_script
- Rename style object
- Add "now" as default date and time.
- Add date and time picker
- Initial release.
iCalendar for Ninja Forms uses the following third-party resources:
- Eluceo\iCal by Markus Poerschke, licensed under the MIT License.
- Openstreetmap for the calendar location.
- Enhanced WP Mail Attachments by Thomas F. Watson.
iCalendar for Ninja Forms is copyright 2021 Per Søderlind
iCalendar for Ninja Forms is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 2 of the License, or (at your option) any later version.
iCalendar for Ninja Forms is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU Lesser General Public License along with the Extension. If not, see http://www.gnu.org/licenses/.