Skip to content

tw-martin/filament-custom-forms

 
 

Repository files navigation

Found missing form in filamentphp here

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.

About

Found missing form in filamentphp here

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • PHP 70.3%
  • JavaScript 15.5%
  • Blade 9.0%
  • CSS 5.2%