PHPackages                             lindemannrock/craft-formie-booking-slot-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. [Utility &amp; Helpers](/categories/utility)
4. /
5. lindemannrock/craft-formie-booking-slot-field

ActiveCraft-plugin[Utility &amp; Helpers](/categories/utility)

lindemannrock/craft-formie-booking-slot-field
=============================================

Booking slot field for Formie - Provides date and time slot selection with capacity tracking for Craft CMS Formie plugin

3.4.0(5mo ago)066MITPHPPHP ^8.2CI passing

Since Nov 12Pushed 5mo ago1 watchersCompare

[ Source](https://github.com/LindemannRock/craft-formie-booking-slot-field)[ Packagist](https://packagist.org/packages/lindemannrock/craft-formie-booking-slot-field)[ RSS](/packages/lindemannrock-craft-formie-booking-slot-field/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (10)Dependencies (2)Versions (43)Used By (0)

Formie Booking Slot Field Plugin
================================

[](#formie-booking-slot-field-plugin)

[![Latest Version](https://camo.githubusercontent.com/5b4c5e59a3d0e6fcbea61e650030acaa3d1e977dd7f80024597d4843154b4d85/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6c696e64656d616e6e726f636b2f63726166742d666f726d69652d626f6f6b696e672d736c6f742d6669656c642e737667)](https://packagist.org/packages/lindemannrock/craft-formie-booking-slot-field)[![Craft CMS](https://camo.githubusercontent.com/c176c7ad994b4d577c758871323311a223477bd0cd427c40a8472fd0cad04992/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4372616674253230434d532d352e302b2d6f72616e67652e737667)](https://craftcms.com/)[![Formie](https://camo.githubusercontent.com/29b31abd3a720b332edc5b3ffe9c13a5e8e17fdd133ebf676003713d455f0727/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f466f726d69652d332e302b2d707572706c652e737667)](https://verbb.io/craft-plugins/formie)[![PHP](https://camo.githubusercontent.com/5fe05c705bf034839bda7651781e4d0a9d42f4a840478ca5e343873a0361bb89/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d382e322b2d626c75652e737667)](https://php.net/)[![License](https://camo.githubusercontent.com/61bdf3feb553c4d6e320016bc2bf59738e59a430dbf244c13fa33ceb5e069c5a/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f6c696e64656d616e6e726f636b2f63726166742d666f726d69652d626f6f6b696e672d736c6f742d6669656c642e737667)](LICENSE)

A Craft CMS plugin that provides a flexible booking slot field for Verbb's Formie form builder, with date and time slot selection, automatic slot generation, and real-time capacity tracking.

Requirements
------------

[](#requirements)

- Craft CMS 5.0 or greater
- PHP 8.2 or greater
- Formie 3.0 or greater

> **Note:** For Craft 4 and Formie 2 support, use the `formie-2-craft-4` branch or version 2.x of this plugin.

Features
--------

[](#features)

### Flexible Date Configuration

[](#flexible-date-configuration)

- **Specific Dates**: Define exact dates for events and special occasions
- **Date Range**: Set start/end dates with automatic date generation
- **Day of Week Filtering**: Choose which weekdays are available (e.g., Mon-Fri only)
- **Blackout Dates**: Exclude specific dates (holidays, closures)

### Automatic Time Slot Generation

[](#automatic-time-slot-generation)

- **Operating Hours**: Set daily start/end times with hour/minute dropdowns
- **Slot Duration**: Choose from 15 minutes to 4 hours
- **Smart Generation**: Slots automatically created based on your rules

### Capacity Tracking

[](#capacity-tracking)

- **Real-time Availability**: Shows remaining spots per slot
- **Submission Status Integration**: Count only confirmed bookings, exclude cancellations
- **Full Slot Detection**: Automatically disables fully booked slots
- **Visual Indicators**: Clear display of available vs. full slots

### Display Options

[](#display-options)

- **Radio Buttons**: Visual button cards for dates and slots
- **Dropdown Selects**: Compact dropdowns for many options
- **Responsive Design**: Works seamlessly on all devices
- **Customizable**: Configurable per field

### Seamless Integration

[](#seamless-integration)

- Native Formie field with full validation support
- Email notification templates included
- Control panel submission display
- GraphQL support for headless implementations

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

[](#installation)

### Via Composer

[](#via-composer)

```
cd /path/to/project
```

```
composer require lindemannrock/craft-formie-booking-slot-field
```

```
./craft plugin/install formie-booking-slot-field
```

### Using DDEV

[](#using-ddev)

```
cd /path/to/project
```

```
ddev composer require lindemannrock/craft-formie-booking-slot-field
```

```
ddev craft plugin/install formie-booking-slot-field
```

### Via Control Panel

[](#via-control-panel)

In the Control Panel, go to Settings → Plugins and click "Install" for Formie Booking Slot Field.

Configuration
-------------

[](#configuration)

### Plugin Settings

[](#plugin-settings)

Navigate to **Settings → Plugins → Formie Booking Slot Field** to configure defaults for all booking fields:

- **General Settings**: Plugin name
- **Default Field Settings**: Display types, show capacity toggle
- **Default Labels**: All text labels and placeholders
- **Default Booking Configuration**: Operating hours, slot duration, capacity
- **Default Formats**: Date and time display formats

All settings can be overridden per field, or set globally in `config/formie-booking-slot-field.php`.

### Config File

[](#config-file)

Create `config/formie-booking-slot-field.php` to override settings:

```
cp vendor/lindemannrock/craft-formie-booking-slot-field/src/config.php config/formie-booking-slot-field.php
```

Example configuration:

```
return [
    '*' => [
        'pluginName' => 'Bookings',
        'defaultDateDisplayType' => 'select',
        'defaultSlotDisplayType' => 'select',
        'defaultOperatingHoursStart' => '09:00',
        'defaultOperatingHoursEnd' => '17:00',
        'defaultSlotDuration' => 60,
        'defaultMaxCapacityPerSlot' => 10,
    ],
];
```

See [src/config.php](src/config.php) for all available options.

Usage
-----

[](#usage)

### Adding a Booking Slot Field

[](#adding-a-booking-slot-field)

1. Open your form in the Formie form builder
2. Click "Add Field" and select "Booking Slot" from the field types
3. Configure the field settings across four tabs:

#### General Tab

[](#general-tab)

**Date Selection Mode**

- **Specific Dates**: For events with fixed dates (e.g., Dec 5-6, 2025)

    - Add dates in YYYY-MM-DD format (e.g., 2025-12-05)
    - Optional display labels (e.g., "December 5th, 2025")
- **Date Range**: For ongoing bookings (e.g., next 30 days)

    - **Start Date**: Today, Tomorrow, or Specific Date
    - **End Date**: +7, +14, +30, +60, +90 days, or Specific Date
    - Creates rolling booking windows (updates daily)
    - Choose which days of week are available
    - Add blackout dates if needed

#### Settings Tab

[](#settings-tab)

**Time Configuration**

- **Start Time**: Hour and minute when bookings begin each day
- **End Time**: Hour and minute when bookings end each day
- **Slot Duration**: Choose from 15 min, 30 min, 1 hour, 2 hours, etc.

**Capacity Management**

- **Max Capacity Per Slot**: How many people per time slot
- **Show Remaining Capacity**: Display spots left to users
- **Count As Booked Statuses**: Select which submission statuses count (e.g., only "Confirmed")

**Display Options**

- **Date Display Type**: Radio buttons (visual) or Dropdown (compact)
- **Slot Display Type**: Radio buttons (visual) or Dropdown (compact)

#### Appearance Tab

[](#appearance-tab)

- **Label Positions**: Main label, date label, slot label positioning
- **Display Types**: Radio buttons or dropdowns for date/slots
- **Formats**: Date and time display formats with live examples
- **Show Remaining Capacity**: Toggle capacity display
- **Instructions**: Field instructions and positioning
- **Visibility**: Field visibility settings

#### Advanced Tab

[](#advanced-tab)

- Handle, CSS classes, container attributes

### Example Configurations

[](#example-configurations)

#### Event Booking (e.g., M Cars Driving Experience)

[](#event-booking-eg-m-cars-driving-experience)

```
Date Mode: Specific Dates
Dates: 2025-12-05, 2025-12-06
Operating Hours: 10:00 - 22:00
Slot Duration: 2 hours
Max Capacity: 16
Display: Dropdown

Result: 12 slots (6 per day × 2 days), 192 total capacity

```

#### Doctor Appointments (Rolling Window)

[](#doctor-appointments-rolling-window)

```
Date Mode: Date Range
Start: Today (relative)
End: +30 days (relative)
Days: Mon-Fri
Operating Hours: 09:00 - 17:00
Slot Duration: 30 minutes
Max Capacity: 1
Display: Dropdown

Result: Rolling 30-day appointment window, updates daily automatically

```

#### Workshop Series

[](#workshop-series)

```
Date Mode: Specific Dates
Dates: Workshop dates
Operating Hours: 09:00 - 16:00
Slot Duration: 3 hours
Max Capacity: 25
Display: Radio Buttons

Result: 2-3 sessions per day with group registration

```

### Handling Cancellations

[](#handling-cancellations)

#### Option 1: Delete Submission (Simple)

[](#option-1-delete-submission-simple)

- Go to Formie → Submissions
- Delete the booking
- Capacity automatically increases

#### Option 2: Status Tracking (Recommended)

[](#option-2-status-tracking-recommended)

1. **Set up submission statuses** in Formie → Settings → Statuses:

    - Add status: "Confirmed"
    - Add status: "Cancelled"
2. **Configure form default status**:

    - Form → Settings → Default Status: "Confirmed"
3. **Configure booking field**:

    - Settings → Count As Booked Statuses: ✅ Confirmed
4. **To cancel a booking**:

    - Find submission in Formie CP
    - Change status: Confirmed → Cancelled
    - Capacity automatically updates
    - Booking record preserved

### Templating

[](#templating)

In your templates, the booking field is rendered automatically by Formie:

```
{# Render the entire form #}
{{ craft.formie.renderForm('bookingForm') }}

{# Or render a specific field #}
{% set form = craft.formie.forms.handle('bookingForm').one() %}
{{ craft.formie.renderField(form, 'bookingSlot') }}
```

### Accessing Booking Data

[](#accessing-booking-data)

```
{# In email notifications or templates #}
{% set booking = submission.bookingSlotHandle %}
{{ booking.date }} {# e.g., 2025-12-05 #}
{{ booking.slot }} {# e.g., 10:00-12:00 #}
```

### GraphQL Support

[](#graphql-support)

Query booking slot data via GraphQL:

```
query {
  formieSubmissions(form: "bookingForm") {
    ... on bookingForm_Submission {
      bookingSlot
    }
  }
}
```

Field Settings Reference
------------------------

[](#field-settings-reference)

### General Settings

[](#general-settings)

SettingDescriptionOptions**Date Selection Mode**How dates are configured`specific`, `range`**Specific Dates**Individual dates (specific mode)Table: Date, Label**Start Date**First available date (range mode)Date picker**End Date**Last available date (range mode)Date picker**Days of Week**Available weekdays (range mode)Sun-Sat checkboxes**Blackout Dates**Dates to excludeTable: Date### Settings Tab

[](#settings-tab-1)

SettingDescriptionOptions**Start Time - Hour**Hour when bookings start00-23**Start Time - Minute**Minute when bookings start00, 15, 30, 45**End Time - Hour**Hour when bookings end00-23**End Time - Minute**Minute when bookings end00, 15, 30, 45**Slot Duration**Length of each booking slot15min-4hours**Max Capacity Per Slot**People per slotNumber**Show Remaining Capacity**Display spots lefttrue/false**Count As Booked Statuses**Which statuses countFormie statuses**Date Display Type**How dates appear`radio`, `select`**Slot Display Type**How slots appear`radio`, `select`File Structure
--------------

[](#file-structure)

```
plugins/formie-booking-slot-field/
├── src/
│   ├── fields/
│   │   └── BookingSlot.php          # Main field class
│   ├── models/
│   │   └── Settings.php             # Plugin settings model
│   ├── templates/
│   │   ├── fields/
│   │   │   └── booking-slot/
│   │   │       ├── input.html       # Field input template
│   │   │       └── email.html       # Email template
│   │   └── settings.html            # Plugin settings template
│   ├── web/
│   │   └── assets/
│   │       └── field/
│   │           ├── BookingSlotFieldAsset.php
│   │           ├── booking-slot.js
│   │           ├── booking-slot.min.js
│   │           ├── booking-slot.css
│   │           └── booking-slot.min.css
│   └── FormieBookingSlotField.php   # Main plugin class
├── CHANGELOG.md
├── LICENSE.md
├── README.md
├── package.json
└── composer.json

```

Development
-----------

[](#development)

### Building Minified Assets

[](#building-minified-assets)

After editing CSS or JavaScript:

```
cd plugins/formie-booking-slot-field
npm install           # First time only
npm run minify        # Build minified versions
```

The asset bundle automatically uses minified versions in production (when devMode is off).

Support
-------

[](#support)

- **Documentation**:
- **Issues**:
- **Email**:

License
-------

[](#license)

This plugin is licensed under the MIT License. See [LICENSE](LICENSE) for details.

---

Developed by [LindemannRock](https://lindemannrock.com)

Built for use with [Formie](https://verbb.io/craft-plugins/formie) by Verbb

###  Health Score

39

—

LowBetter than 86% of packages

Maintenance70

Regular maintenance activity

Popularity9

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity60

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~0 days

Total

41

Last Release

162d ago

Major Versions

2.0.6 → 3.2.02025-11-13

2.1.0 → 3.3.02025-11-14

2.3.3 → 3.4.02025-11-15

PHP version history (2 changes)3.0.0PHP ^8.2

3.1.0PHP ^8.0.2

### Community

Maintainers

![](https://www.gravatar.com/avatar/88c830ac26a6d6b575430b14695a81810dc436a5d5be138e5ec28a367a314cae?d=identicon)[bhlindemann](/maintainers/bhlindemann)

---

Top Contributors

[![bhlindemann](https://avatars.githubusercontent.com/u/81223527?v=4)](https://github.com/bhlindemann "bhlindemann (47 commits)")

---

Tags

appointmentsbookingcalendarcapacity-trackingcraftcmscraftcms-pluginformieformsreservation-systemschedulingtime-slotscmsCraftcraftcmscraft-pluginformiereservationtime slotbooking slot

### Embed Badge

![Health badge](/badges/lindemannrock-craft-formie-booking-slot-field/health.svg)

```
[![Health](https://phpackages.com/badges/lindemannrock-craft-formie-booking-slot-field/health.svg)](https://phpackages.com/packages/lindemannrock-craft-formie-booking-slot-field)
```

###  Alternatives

[verbb/formie

The most user-friendly forms plugin for Craft.

101372.9k40](/packages/verbb-formie)[verbb/navigation

Create navigation menus for your site.

90683.7k17](/packages/verbb-navigation)[verbb/comments

Add comments to your site.

13753.1k](/packages/verbb-comments)[verbb/tablemaker

Create customizable and user-defined table fields.

40168.8k1](/packages/verbb-tablemaker)[supercool/tablemaker

Create customizable and user-defined table fields.

40141.7k](/packages/supercool-tablemaker)[verbb/vizy

A flexible visual editor field for Craft.

4348.6k](/packages/verbb-vizy)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
