Download the PHP package litepie/form without Composer
On this page you can find all versions of the php package litepie/form. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Package form
Short Description A comprehensive Laravel form builder package with advanced features, caching, and modern design patterns
License MIT
Homepage https://github.com/litepie/form
Informations about the package form
Litepie Form Builder
Package: litepie/form | Type: Laravel Form Builder | Laravel: 11+ & 12+ | PHP: 8.2+
AI Context: See .ai-context.md for structured package information for AI assistants
A comprehensive, production-ready Laravel form builder package inspired by the original Litepie/Form but completely rewritten for Laravel 12 with modern design patterns and advanced features.
๐ Table of Contents
- Features
- Installation
- Quick Start
- Field Types
- Advanced Features
- Form Container
- Client-Side Integration
- Validation
- File Uploads
- Performance & Caching
- Testing
- API Reference
- Documentation
- Contributing
- Security
- Support
โจ Features
- ๐ Laravel 12 Ready: Built for Laravel 11+ with full Laravel 12 compatibility
- ๐จ Multiple UI Frameworks: Bootstrap 5, Bootstrap 4, Tailwind CSS, and custom themes
- ๐ 30+ Field Types: Complete field library including advanced types like rich text, maps, file uploads
- ๐ Field Visibility Control: Permission-based, role-based, and conditional field visibility
- Methods:
can(),roles(),visibleWhen(),isVisible() - Integration: Works with
render(),toArray(),toJson()
- Methods:
- ๐พ Performance Caching: User-scoped form caching with TTL support
- Methods:
cache(),cached(),clearCache(),withoutCache() - Automatic per-user cache scoping
- Methods:
- ๐๏ธ Hierarchical Organization: Groups โ Sections โ Rows โ Fields
- Methods:
group(),section(),row(),divider(),endGroup(),endSection() - Auto-assignment of fields to active group/section
- Methods:
- ๐ Grid Layout System: Responsive 12-column grid with custom widths
- Methods:
col(),width(),defaultWidth() - Output includes width, row, group, section metadata
- Methods:
- โ Advanced Validation: Real-time validation, conditional rules, custom validators
- ๐ Conditional Logic: Dynamic field visibility, validation, and multi-step forms
- ๐ File Management: Drag & drop uploads, image cropping, gallery management, cloud storage
- ๐ฆ Form Container: Manage multiple forms with tabbed, accordion, or stacked interfaces
- โฟ Accessibility: WCAG 2.1 AA compliant with full screen reader support
- โก Performance: Optimized rendering, asset bundling, lazy loading
- ๐ Client-Side Ready: Full support for Vue.js, React, Angular with
toArray()andtoJson() - ๐งช Well Tested: Comprehensive test suite with 95%+ code coverage
- ๐ฏ Developer Friendly: Fluent API, extensive documentation, helper functions
๐ฆ Installation
Publish the configuration and assets:
Include the CSS and JavaScript assets in your layout:
๐ Quick Start
Creating Fields
The package provides multiple ways to create fields:
Method 1: Using Field::make() (Recommended)
Method 2: Using Form Builder add() method
Method 3: Using Specific Field Classes
Basic Contact Form
Registration Form with File Upload
Helper Functions
Field Visibility & Permissions
Control field visibility based on user permissions and roles:
See VISIBILITY.md for complete visibility control documentation.
Performance: Caching Form Output
Enable caching for forms that don't change frequently:
Use caching for:
- Forms with many fields and complex visibility logic
- API endpoints serving the same form to many users
- Admin panels with heavy permission checks
Grid Layout & Column Width
Control field widths for responsive grid layouts (works with Bootstrap, Tailwind, or any frontend):
Frontend Implementation:
Hierarchical Form Organization (Groups, Sections, Rows)
Organize complex forms with a hierarchical structure: Form โ Groups โ Sections โ Rows โ Fields
Key Features:
- Groups: Top-level organization with titles and descriptions
- Sections: Sub-groups within groups (can have multiple sections per group)
- Rows: Layout containers for fields with column widths
- Dividers: Visual separators with optional labels
- Auto-assignment: Fields added after
group()orsection()automatically inherit the group/section - Flexible nesting: Mix grouped and ungrouped fields in the same form
Alternative Syntax (without fluent methods):
Output Structure (toArray/toJson):
Frontend Rendering:
Divider Types:
๐ Field Types
'required' => true
]);
// Form container $container = form_container('my-container');
// Quick container creation $quickContainer = form_container_quick([ 'form1' => [ 'fields' => ['name' => 'text', 'email' => 'email'], 'containerOptions' => ['title' => 'Contact Info'] ] ], ['name' => 'Multi-Form Container', 'tabbed' => true]); blade @extends('layouts.app')
@section('content')
Contact Us
@if(session('success'))@endsection
@push('styles') {!! form_include_assets(true, false) !!} @endpush
@push('scripts') {!! form_include_assets(false, true) !!} @endpush vue
blade
javascript document.addEventListener('form:validation:success', function(event) { console.log('Form validated successfully', event.detail); });
document.addEventListener('form:validation:error', function(event) { console.log('Validation errors', event.detail.errors); }); bash
Run all tests
composer test
Run specific test suite
composer test -- --filter=FormBuilderTest
Run with coverage
composer test -- --coverage-html coverage bash git clone https://github.com/litepie/form.git cd form composer install composer test bash composer format # Fix code style composer format:check # Check code style composer analyse # Static analysis composer ci # Run all checks
## ๐ License
The MIT License (MIT). Please see [LICENSE](LICENSE) for more information.
## โก Performance & Caching
### Caching Support
Form containers support comprehensive caching to improve performance:
### Cache Configuration
Add to your `config/form.php`:
### Cache Benefits
- **50-90% faster rendering** for complex forms
- **Reduced server load** with cached HTML output
- **Automatic invalidation** when forms are modified
- **Tagged cache** for efficient bulk clearing
- **Multiple drivers** (file, redis, memcached)
For detailed caching documentation, see [doc/caching.md](doc/caching.md).
## ๏ฟฝ Documentation
- **[Examples](doc/examples.md)** - Comprehensive examples for all field types and features
- **[Container Examples](doc/container-examples.md)** - Multi-form container usage and patterns
- **[Client-Side Examples](doc/client-side-examples.md)** - JavaScript integration and API usage
- **[Caching Guide](doc/caching.md)** - Performance optimization with caching
## ๏ฟฝ๐ Security
If you discover security vulnerabilities, please send an email to [email protected] instead of using the issue tracker.
## ๐ Support
- ๐ [Documentation](https://litepie.com/docs/form)
- ๐ [Issue Tracker](https://github.com/Litepie/Form/issues)
- ๐ฌ [Discussions](https://github.com/Litepie/Form/discussions)
- ๐ง [Email Support](mailto:[email protected])
---
## ๐ข About
This package is part of the **Litepie** ecosystem, developed by **Renfos Technologies**.
### Organization Structure
- **Vendor:** Litepie
- **Framework:** Lavalite
- **Company:** Renfos Technologies
### Links & Resources
- ๐ **Website:** [https://lavalite.org](https://lavalite.org)
- ๐ **Documentation:** [https://docs.lavalite.org](https://docs.lavalite.org)
- ๐ผ **Company:** [https://renfos.com](https://renfos.com)
- ๐ง **Support:** [[email protected]](mailto:[email protected])
---
## ๐ค For AI Assistants
<!-- AI-METADATA-START -->
**Quick Context File**: [.ai-context.md](.ai-context.md) - Comprehensive package structure and patterns
**Architecture Pattern**: Fluent Builder + Factory + Service Provider
**Key Classes**: `FormBuilder`, `Field`, `FormRenderer`, `FormValidator`
**Main Features**: Visibility Control, Caching, Hierarchical Organization, Grid Layout
**Output Formats**: HTML (`render()`), Array (`toArray()`), JSON (`toJson()`)
**Integration**: Laravel 11+/12+, Bootstrap/Tailwind, Vue/React/Angular
**Common User Requests**:
- "Create form" โ `Form::create()->add()->render()`
- "Hide field from users" โ `->can('permission')` or `->roles(['admin'])`
- "Improve performance" โ `->cache(ttl)`
- "Responsive layout" โ `->row([Field::text()->col(6), ...])`
- "Complex sections" โ `->group()->section()->row()`
- "JSON for frontend" โ `->toArray()` or `->toJson()`
<!-- AI-METADATA-END -->
---
<div align="center">
<p><strong>Built with โค๏ธ by Renfos Technologies</strong></p>
<p><em>Empowering developers with robust Laravel solutions</em></p>
</div>All versions of form with dependencies
laravel/framework Version ^11.0|^12.0
illuminate/support Version ^11.0|^12.0
illuminate/validation Version ^11.0|^12.0
illuminate/view Version ^11.0|^12.0
illuminate/cache Version ^11.0|^12.0