FilamentF
Filament2y ago
Aris

add javascript on form

I would like to add my custom javascript on the form, how can I do that? I cannot find it on Stackoverflow or Gpt.

What I want to try to achieve is when text inputs A and B are filled, the text input C will be filled with A + B.

I understand it's really simple, but I still cannot find how can I add a custom JS on forms

Thank you.
Solution
Or you can use this,
https://filamentphp.com/docs/3.x/forms/advanced#generating-a-slug-from-a-title

into both of your a and b field and set c field whenever any of a or b field update.
Was this page helpful?