PHPackages                             scottboms/events-field - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. scottboms/events-field

ActiveKirby-plugin

scottboms/events-field
======================

Events Field plugin for Kirby

1.1.1(8mo ago)20MITVuePHP &gt;=8.1.0

Since Aug 28Pushed 4mo ago1 watchersCompare

[ Source](https://github.com/scottboms/kirby-events-field)[ Packagist](https://packagist.org/packages/scottboms/events-field)[ Docs](https://github.com/scottboms/kirby-events-field)[ RSS](/packages/scottboms-events-field/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (2)Dependencies (1)Versions (5)Used By (0)

Events Field plugin for Kirby
=============================

[](#events-field-plugin-for-kirby)

[![Plugin Preview](src/assets/events-field-plugin.jpg)](src/assets/events-field-plugin.jpg)

Adds a customizable Event Field Type for Kirby.

Installation
------------

[](#installation)

### [Kirby CLI](https://github.com/getkirby/cli)

[](#kirby-cli)

```
kirby plugin:install scottboms/kirby-events-field
```

### Git submodule

[](#git-submodule)

```
git submodule add https://github.com/scottboms/kirby-events-field.git site/plugins/kirby-events
```

### Copy and Paste

[](#copy-and-paste)

1. [Download](https://github.com/scottboms/kirby-events-field/archive/master.zip) the contents of this repository as Zip file.
2. Rename the extracted folder to `kirby-events` and copy it into the `site/plugins/` directory in your Kirby project.

Usage
-----

[](#usage)

### Blueprint Configuration

[](#blueprint-configuration)

In a Page blueprint, add a new field with the type `event.` Standard field attributes such as `label, required, help`, etc. can also be used to override defaults. Use `empty` to change the text displayed when the field is in an empty state.

### Field Properties

[](#field-properties)

NameTypeDefaultDescriptionemptystring`null`The placeholder text if no information has been addedpreviewarray`[ ]`Optional array of field names to display in the previeweventNameboolean`true`If `true`, the field is available in the formendDateboolean`true`If `true`, the field is available in the formtimeStartboolean`true`If `true`, the field is available in the formtimeEndboolean`true`If `true`, the field is available in the formcityboolean`true`If `true`, the field is available in the formstateboolean`true`If `true`, the field is available in the formcountryboolean`true`If `true`, the field is available in the formvenueboolean`true`If `true`, the field is available in the formurlboolean`true`If `true`, the field is available in the formdetailsboolean`true`If `true`, the field is available in the form```
  event:
    # standard properties from Kirby
    label: Example Event
    required: false
    width: 1/3

    # field properties
    type: event
    empty: 'Add an event'

    # optional field properties
    eventName: true
    endDate: true
    timeStart: true
    timeEnd: true
    venue: true
    city: true
    state: true
    country: true
    url: true
    details: true

    # preview table display
    # list of available field names
    preview:
      - eventName
      - startDate
      - endDate
      - timeStart
      - timeEnd
      - eventDates # summary of startDate, endDate
      - eventTime # summary of timeStart, timeEnd
      - city
      - state
      - country
      - location # summary of city, state, country
      - venue
      - url
      - details
```

### Templates and Snippets

[](#templates-and-snippets)

To access an event field in your templates, you can use the toEvent() method.

```

 –
