This is a (work in progress) proof of concept for a FilamentPHP-like formbuilder-approach for Splade.dev forms.
Todo:
- Selects: https://splade.dev/docs/form-select
- Multiple checkboxes-support (from an array): https://splade.dev/docs/form-checkbox
- Multiple radios-support (from an array): https://splade.dev/docs/form-radio
- Files: https://splade.dev/docs/form-radio
- File-validation
- Groups? https://splade.dev/docs/form-group
- Validation (
->rules('required', 'string', 'max:255')
) & show-errors https://splade.dev/docs/form-overview - Placeholders, prepends, appends
- Help-texts
- Disabled / readonly / required
- ->email() / ->password()
- ->numeric() / ->integer() / ->step(2) / ->unsigned()
- Refactor into SpladeForm-class (like SpladeTable)
- color picker
- Model-binding: https://splade.dev/docs/form-model-binding-attributes
-
ExampleForm::build()
=>ExampleForm::class
? -
php artisan make:form
command- make:form-request and make:form -r
- Validation for non SpladeForm-class requests
- Tests
- Documentation
- Create pull request
Maybe later:
- ->decimals(2) ?
- ->url() ?
- Datepicker timezone?
To see this poc in action: https://splade-formbuilder.j87.nl
Source/config: https://github.com/J87NL/splade-formbuilder/blob/main/app/Http/Controllers/FormbuilderController.php