LaravelPackages.net
Acme Inc.
Toggle sidebar
masehitam/filament-signature-pad

Signature Pad Field for Filamentphp Forms

2
0
About masehitam/filament-signature-pad

masehitam/filament-signature-pad is a Laravel package for signature pad field for filamentphp forms. It currently has 0 GitHub stars and 2 downloads on Packagist. Install it with composer require masehitam/filament-signature-pad. Discover more Laravel packages by masehitam or browse all Laravel packages to compare alternatives.

Last updated

Signature Pad Field for Filamentphp Forms

Latest Version on Packagist GitHub Tests Action Status GitHub Code Style Action Status Total Downloads

img.png

A Signature Pad Field for the FilamentPHP Form Builder using szimek/signature_pad

Installation

You can install the package via composer:

composer require savannabits/filament-signature-pad

Usage

You can now use the SignaturePad field in your form builder.

    use Savannabits\SignaturePad\Forms\Components\Fields\SignaturePad;
    public static function form(Form $form): Form
    {
        return $form
            ->schema([
                // ... Other fields
                SignaturePad::make('signature'), // Chain your field modifiers here
                // Other fields
            ]);
    }

You can also set the Signature Pad Options as shown below. See SignaturePad Options Docs for more details.

    use Savannabits\SignaturePad\Forms\Components\Fields\SignaturePad;
    public static function form(Form $form): Form
    {
        return $form
            ->schema([
                // ... Other fields
                SignaturePad::make('signature')
                    ->strokeMinWidth(1.0)
                    ->strokeMaxWidth(2.5)
                    ->strokeDotSize(2.0)
                    ->penColor('rgb(0,0,255)') // Blue
                    ->backgroundColor('rgba(0,0,0,0)'), // Black Transparent
                // Other fields
            ]);
    }

img_1.png

Upon Saving, the signature image is saved to the database as a png data url. Plans are underway to also support uploading the signature to the server as an image blob file.

Testing

composer test

Changelog

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

Contributing

Please see CONTRIBUTING for details.

Security Vulnerabilities

Please review our security policy on how to report security vulnerabilities.

Credits

License

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

Comments