Shop Opening Times Form

Filament 3

Dynamic form with multiple checkboxes/dropdowns for the weekdays when the shop is opened. Also, custom table columns to show opening times.

10-shop-opening-times-form

Get the Source Code:

Only This Example

$9

One-time payment

Full source code for Shop Opening Times Form
Downloadable ZIP file with the source code
Lifetime access to this example
GitHub Sign in with GitHub to buy

Sign in first, then complete your $9 checkout.

Best value — all 174 examples

FilamentExamples Membership

$99 /year
or
$199 lifetime
Access to code of all 174 examples
Future new examples and updates included
FilaCheck Pro package licence included
MCP server included
View membership plans

30-day money-back guarantee

How it works

The main logic lives in our ShopResource method form():

  • We are using a Repeater field to create a dynamic form with multiple rows
  • We are assigning default array of items to the Repeater field
  • We are using live() fields (reactive fields) to enable/disable other fields based on the checkbox value

And for our Index, we are using a custom column Opening Times:

  • We simply create a new column
  • Pass the relationship details
  • Print rows

Working With Form

app/Filament/Resources/ShopResource.php

class ShopResource extends Resource
{
public static function form(Form $form): Form
{
return $form
->schema([
Forms\Components\TextInput::make('name')
->required()
->maxLength(255),
// Simple new section to group fields
Forms\Components\Section::make('Opening Times')
->schema([
// Repeater field with relationship to OpeningTime model
Repeater::make('openingTimes')
 
// ...
The FULL tutorial is available after the purchase: in the Readme file of the official repository you would get invited to.