Custom field with alpinejs function
Hello,
I'm trying to create a custom field using Alpine.js code. I've created a simple example to learn how to do this, but it's not working.
This is my custom field code:
I've added the hello function in app.js:
However, the console shows that the hello function is not defined.
How can I make this work without putting the function directly in the x-data block? The function will be quite large.
Thanks.
1 Reply
Hey
You have to create a custom js then use the command to share it!
Hope that will work for you!