Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

signaturePad is not defined #25

Open
tnt-ylli opened this issue Dec 29, 2024 · 5 comments
Open

signaturePad is not defined #25

tnt-ylli opened this issue Dec 29, 2024 · 5 comments
Labels
bug Something isn't working

Comments

@tnt-ylli
Copy link

tnt-ylli commented Dec 29, 2024

What happened?

Im trying to add the signaturePad on the modal , its showing this error : signaturePad is not defined
Is there a trick to avoid this. im also trying to add js script on my app.blade , not working, this for sure should be something easy. Thanks

How to reproduce the bug

Forms\Components\Section::make('Signature')
                        ->schema([
                            Forms\Components\Actions::make([
                                Action::make('signature')
                                    ->label('Signature')
                                    ->form([
                                        SignaturePad::make('signature')
                                    ])
                                    ->action(function (array $data,Details $detail){
                                        $detail->signature = $data['signature'];
                                        $detail->save();
                                    })
                            ])
                        ]),

Package Version

2.00

PHP Version

8.2

Laravel Version

10.x

Which operating systems does with happen with?

No response

Notes

No response

@tnt-ylli tnt-ylli added the bug Something isn't working label Dec 29, 2024
@menchhub
Copy link

Also trying to use in and Infolist page but it is not working
i want to use it infolist filament
SignaturePad::make('approval_level_a_sign')
->label('Manager Signature')
Error Message
Filament\Infolists\ComponentContainer::Filament\Infolists\Concerns{closure}(): Argument #1 ($component) must be of type Filament\Infolists\Components\Component, Saade\FilamentAutograph\Forms\Components\SignaturePad given

@denizaygundev
Copy link

denizaygundev commented Feb 16, 2025

@tnt-ylli I spent over 1-2 hours trying to solve this but gave up and using an alternative filament plugin for signatures, basically identical: https://filamentphp.com/plugins/coolsam-signature-pad

If you're really determined to solve this, comparing the signature-pad.blade.php from both of these could be worth looking at.

Edit - Actually this PR solves the issue for me: https://github.com/saade/filament-autograph/pull/24/files

@denizaygundev
Copy link

As an immediate solution @tnt-ylli you can publish the package's views with php artisan vendor:publish then choose Saade\FilamentAutograph\FilamentAutographServiceProvider, and update to ax-load="idle"`

@tnt-ylli
Copy link
Author

I missed this PR!! It looks that can fix the issue.
But I changed the way I wanted to make it work. My solution was that i added signature on page not modal anymore. and is working pretty cool. Thank you guys for effort !!

@mbalcaen
Copy link

Also trying to use in and Infolist page but it is not working i want to use it infolist filament SignaturePad::make('approval_level_a_sign') ->label('Manager Signature') Error Message Filament\Infolists\ComponentContainer::Filament\Infolists\Concerns{closure}(): Argument #1 ($component) must be of type Filament\Infolists\Components\Component, Saade\FilamentAutograph\Forms\Components\SignaturePad given

If you use ImageEntry in the InfoList it will generate the image from the entry in the database.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants