vbytes_lan/app/Filament/Resources/Volunteers/Schemas/VolunteerForm.php
2025-11-15 17:07:19 +01:00

50 lines
1.5 KiB
PHP

<?php
namespace App\Filament\Resources\Volunteers\Schemas;
use Filament\Forms\Components\TextInput;
use Filament\Forms\Components\Textarea;
use Filament\Forms\Components\Toggle;
use Filament\Schemas\Schema;
use Filament\Forms\Components\CheckboxList;
use DiscoveryDesign\FilamentGaze\Forms\Components\GazeBanner;
class VolunteerForm
{
public static function configure(Schema $schema): Schema
{
return $schema
->components([
GazeBanner::make()
->pollTimer(10)
->hideOnCreate(),
TextInput::make('lan_id')
->integer(),
Toggle::make('gdpr')
->columnSpan('full')
->required(),
TextInput::make('first_name')
->required(),
TextInput::make('surname')
->required(),
TextInput::make('phone')
->tel()
->required(),
TextInput::make('email')
->label('Email address')
->email()
->required(),
CheckboxList::make('areas')
->required()
->columnSpan('full')
->options([
'Städ' => 'Städ',
'Säkerhet' => 'Säkerhet',
'Kiosk' => 'Kiosk',
]),
Textarea::make('comment')
->columnSpan('full'),
]);
}
}