rupadana/filament-custom-forms

Found missing form in filamentphp here

3.0.3 2023-10-05 15:25 UTC

README

Latest Version on Packagist Total Downloads

This is where your description should go. Limit it to a paragraph or two. Consider adding a small example.

Installation

You can install the package via composer:

composer require rupadana/filament-custom-forms

Usage

Input Group

InputGroup::make(3)
    ->label('Input Group')
    ->schema([
        TextInput::make('first'),
        Select::make('second'),
        ColorPicker::make('third'),
    ])

Show child Label

InputGroup::make(3)
    ->showChildLabel()
    ->schema([
        TextInput::make('first'),
        Select::make('second'),
        ColorPicker::make('third'),
    ])

Input Slider

Simple Input Slider

InputSliderGroup::make()
->sliders([
    InputSlider::make('column_name')
])
->label('Column Name')

Multiple Input

InputSliderGroup::make()
->sliders([
    InputSlider::make('column_min')
    InputSlider::make('column_max')
])
->label('Column Name')

Connect

InputSliderGroup::make()
->sliders([
    InputSlider::make('column_min')
    InputSlider::make('column_max')
])
->connect([
    false,
    true,
    false
])
->label('Column Name')

Maximum & Minimum

InputSliderGroup::make()
->sliders([
    InputSlider::make('column_min')
    InputSlider::make('column_max')
])
->connect([
    false,
    true,
    false
])
->max(100)
->min(0)
->label('Column Name')

Complete

InputSliderGroup::make()
    ->sliders([
        InputSlider::make('column_min'),
        InputSlider::make('column_max')->default(50),
    ])
    ->connect([
        true,
        false,
        true
    ]) // array length must be sliders length + 1
    ->range([
        "min" => 30,
        "max" => 100
    ])
    ->step(10)
    ->behaviour([
        InputSliderBehaviour::DRAG,
        InputSliderBehaviour::TAP
    ])
    ->enableTooltips()
    ->label("Input Slider")

Changelog

Please see CHANGELOG for more information on what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Credits

License

The MIT License (MIT). Please see License File for more information.