Download the PHP package dragan/form-components without Composer
On this page you can find all versions of the php package dragan/form-components. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download dragan/form-components
More information about dragan/form-components
Files in dragan/form-components
Package form-components
Short Description Laravel x-blade form components for easy usage
License MIT
Informations about the package form-components
Form Components
A PHP library for managing and rendering form components.
Installation
Install the package using Composer:
Features
- Easy-to-use form components for Laravel applications.
- Supports various form fields such as text, email, password, textarea, select, checkbox, radio, and file input.
- Automatic handling of old input values.
- Supports form model binding.
- Customizable attributes for each form field.
Usage
Form opening and closing
The form::open component is used to create a form. It accepts various attributes such as method, action, and enctype.
Form model
The form::model component can also be used with a model. This allows you to bind the form fields to the model's attributes. You can provide array, object, or collection data to the form.
Form fields
The library provides various form fields such as text, email, password, textarea, select, checkbox, radio, and file input. Each field can be customized with attributes like name, label, value, placeholder, and more.
Text input
Email input
Password input
Textarea
Select
Checkbox
Old input values
The library automatically handles old input values. If the form is submitted and validation fails, the old input values will be repopulated in the form fields. This is done using the old() helper function in Laravel.
Contributing
If you would like to contribute to this library, please fork the repository and submit a pull request. We welcome contributions of all kinds, including bug fixes, new features, and documentation improvements.
License
This library is licensed under the MIT License. See the LICENSE file for more information.