gustiawan/livewire-form-builder
A Laravel Livewire package for building dynamic forms with a visual builder, reusable field components, validation support, and database-backed form definitions. Create, customize, and render forms directly in Livewire apps without repetitive markup.
Install with composer require agus24/livewire-form-builder and confirm your app meets the package’s Livewire/PHP requirements. Start with the package README and, if available, publish config/views with php artisan vendor:publish using the tags documented by the package. In a fresh Livewire component, define a small schema with one text field, render the form builder, and submit it. Once that works, try the 0.7.0 additions: a file upload field, a radio group, and a checkbox group. For day-to-day use, the first realistic case is a CRUD create/edit form where field definitions live in a PHP array or schema class and the builder renders them consistently.
Use a schema-driven approach: define fields in the Livewire component (or a dedicated form schema class), bind them to public Livewire properties, and let the builder render labels, inputs, and validation messages. For submission, validate either with rules derived from the schema or with explicit $this->validate() rules before persisting.
For 0.7.0 field types:
WithFileUploads to the Livewire component, bind the upload property, validate mime/size, and store the temporary file on submit.in: against the allowed options.[], validate with array/min:1 where required, and persist selected values as needed.Integration tips: reuse the same schema for create and edit forms, keep option lists in config or enums, and wrap the builder in a Blade component so form layout stays consistent. For custom behaviour, look for field registration or Blade view override points rather than editing vendor files.
File uploads are the most common source of problems: ensure WithFileUploads, check php.ini upload limits, confirm the Livewire temporary upload disk, and use the correct store()/storePublicly() call. Validation must run against the uploaded file property, not the final stored path.
Checkbox groups need array defaults ([]) to avoid null-property errors, and radio values should be validated strictly against the option values. When fields are shown conditionally, clear stale properties and validation errors so old values do not leak into submissions. After upgrading to 0.7.0, clear cached views/config and republish any package assets if the docs require it. If something renders but does not bind, compare the generated field names with the Livewire property names and add wire:key where fields repeat dynamically.
How can I help you explore Laravel packages today?