Textinput masking with alpine not working
The following code gives an error about not able to find $input. This is code from the v3 documentation. What am I doing wrong?
Solution:Jump to solution
I've found my answer. The problem was a semicolon in the end of the JS.
```
TextInput::make('cost_price')
->prefix('€')
->mask(RawJs::make(<<<'JS'...
5 Replies
When doing it like this it works, however i want to use the
money()
function from alpine.
try this:
@tiespol in your example change
<<<JS
to <<<'JS'
https://github.com/filamentphp/filament/pull/7321/commits/cbef39ca085a3ce903a2cbe31602b540ea549065GitHub
Docs - input mask with RawJs by leandrocfe · Pull Request #7321 · f...
single quotes missed
Changes have been thoroughly tested to not break existing functionality.
New functionality has been documented or existing documentation has been updated to reflect changes....
Thanks for you reaction! I'm actually trying to get a money mask. Do you know how to get the money() method from alpine ? Or is there any custom money mask for filament?
Solution
I've found my answer. The problem was a semicolon in the end of the JS.
Thank you!