Courses

Laravel Filament Admin v2: Practical Course

Slug from Name with Auto-Complete

avatar

I know that this tutorial is for Filament V2. I also tried the updated version on the FilamentPHP site for V3 with the same issue. When typing the data for the 'name' field, the same as the tutorial here, the charactors entered change while typing. If I were to type 'Main Street' three times, all three end up with various typos. Back spacing also seems to do really odd things, This problem is also present in the Edit form. Am I missing something, or is there a known issue? Thank you.

avatar

You should probably add onBlur: true to your ->live() field, as changing the slug real-time is... well, challenging:

https://filamentphp.com/docs/3.x/forms/advanced#reactive-fields-on-blur

Also, we do not recommend you to update the SLUG at the edit form as this will change how your SEO works and the post would lose all traction it got due to URL change. It's better to disable this behaviour on the edit form overall and leave the slug field usable only in create

avatar

This worked perfectlly.

Thank you for your assistance.

avatar
You can use Markdown
avatar
You can use Markdown