A powerful form builder package for Laravel and Accelade. Create dynamic forms with a Filament-compatible API using Blade components.
composer require accelade/formsThe package will auto-register its service provider.
use Accelade\Forms\Form;
use Accelade\Forms\Components\TextInput;
use Accelade\Forms\Components\Select;
use Accelade\Forms\Components\Toggle;
$form = Form::make()
->action('/users')
->schema([
TextInput::make('name')
->label('Full Name')
->required()
->placeholder('Enter your name'),
TextInput::make('email')
->email()
->required(),
Select::make('role')
->options([
'admin' => 'Administrator',
'editor' => 'Editor',
'viewer' => 'Viewer',
])
->searchable(),
Toggle::make('active')
->label('Active Status'),
]);- TextInput - Text, email, password, URL, tel, and numeric inputs
- Textarea - Multi-line text input with autosize support
- Hidden - Hidden form fields
- Select - Dropdown select with searchable, multiple, and remote options
- CheckboxList - Multiple checkbox selection with grid layout
- Radio - Radio button groups
- Checkbox - Single checkbox
- Toggle - Toggle switch
- ToggleButtons - Button-style toggle group
- RichEditor - WYSIWYG editor with toolbar customization
- TipTapEditor - TipTap-based editor with collaboration support
- MarkdownEditor - Markdown editing with preview
- FileUpload - File uploads with FilePond integration
- IconPicker - Icon selection from multiple icon sets
- ColorPicker - Color selection with presets
- DatePicker / TimePicker / DateTimePicker - Date/time selection
- DateRangePicker - Date range selection
- TagsInput - Tag input with suggestions
- EmojiInput - Emoji picker
- PinInput - PIN/OTP code input
- RateInput - Star rating input
- Slider - Range slider input
- NumberField - Numeric input with increment/decrement
- KeyValue - Key-value pair editor
- Repeater - Repeatable field groups
- Group - Group fields together
TextInput::make('username')
->label('Username')
->placeholder('Enter username')
->required()
->minLength(3)
->maxLength(20)
->prefix('@')
->hint('Your unique identifier');
// Email input
TextInput::make('email')->email()->required();
// Password input
TextInput::make('password')->password()->required();
// With date picker
TextInput::make('birthday')
->datePicker()
->format('Y-m-d');// Basic select
Select::make('country')
->options([
'us' => 'United States',
'uk' => 'United Kingdom',
'ca' => 'Canada',
])
->searchable();
// Multiple selection
Select::make('tags')
->multiple()
->options($tags);
// With Choices.js styling
Select::make('category')
->choices(['searchEnabled' => true])
->options($categories);
// Remote options
Select::make('user')
->remoteUrl('/api/users')
->remoteRoot('data')
->optionLabel('name')
->optionValue('id');
// With relationship
Select::make('roles')
->relation('roles')
->multiple();// Image upload
FileUpload::make('avatar')
->image()
->maxSize(2048)
->disk('public')
->directory('avatars');
// Multiple files
FileUpload::make('documents')
->multiple()
->maxFiles(5)
->acceptedFileTypes(['application/pdf', 'image/*'])
->downloadable();
// With FilePond
FileUpload::make('photos')
->filepond(['allowImagePreview' => true])
->multiple();
// With Spatie Media Library
FileUpload::make('gallery')
->collection('gallery')
->mediaBrowser();CheckboxList::make('permissions')
->options([
'create' => 'Create',
'read' => 'Read',
'update' => 'Update',
'delete' => 'Delete',
])
->columns(2)
->bulkToggleable()
->descriptions([
'create' => 'Ability to create new records',
'delete' => 'Ability to delete records',
]);RichEditor::make('content')
->toolbarButtons([
'bold', 'italic', 'underline',
'|',
'bulletList', 'orderedList',
'|',
'link', 'attachFiles',
])
->fileAttachmentsDisk('public')
->fileAttachmentsDirectory('uploads');IconPicker::make('icon')
->sets(['emoji', 'heroicons'])
->defaultSet('heroicons')
->searchable()
->gridColumns(10);
// With Blade Icons
IconPicker::make('icon')
->bladeIcons()
->perPage(50);Form::make()
->action('/submit')
->method('POST')
->hasFiles() // Enable file uploads
->confirm('Are you sure?')
->confirmButtonText('Yes, submit')
->cancelButtonText('Cancel')
->stayOnPage() // Don't redirect after submit
->preserveScroll()
->resetOnSuccess()
->submitOnChange() // Auto-submit on field change
->debounce(500)
->schema([...]);Validation rules are automatically extracted from field definitions:
TextInput::make('email')
->email()
->required()
->rules(['unique:users,email']);You can also use Form Request validation alongside component rules.
Detailed documentation for each component is available in the docs directory:
- Getting Started - Installation and basic usage
- API Reference - Complete API documentation
- Text Input - Text, email, password, URL inputs
- Textarea - Multi-line text with autosize
- Number Field - Numeric input with controls
- Select - Dropdown with search, multiple, remote options
- Checkbox - Single checkbox
- Checkbox List - Multiple checkbox selection
- Radio - Radio button groups
- Toggle - Toggle switch
- Toggle Buttons - Button-style toggles
- Rich Editor - WYSIWYG editor
- TipTap Editor - TipTap-based editor
- Markdown Editor - Markdown with preview
- Date Picker - Date selection
- Time Picker - Time selection
- DateTime Picker - Combined date/time
- Date Range Picker - Date range selection
- File Upload - File uploads with FilePond
- Icon Picker - Icon selection
- Color Picker - Color selection
- Tags Input - Tag input with suggestions
- Pin Input - PIN/OTP code input
- Rate Input - Star rating
- Slider - Range slider
- Key Value - Key-value pair editor
- Repeater - Repeatable field groups
Publish the config file:
php artisan vendor:publish --tag=forms-config- PHP 8.2+
- Laravel 11.0+ or 12.0+
- Accelade core package
composer testMIT License. See LICENSE for details.