Conditional hidden field with javascript
Hi
I have a field with conditional hidden property
This is a custom field which need javascript to render the field correctly
But the javascript never runs
5 Replies
Maybe share your field implementation
Sure
When I use it without
hidden
the javascript worksDo you really need that hidden element? Not sure whether Alpine can bind to hidden 🤔
Yes, I need to select where the video is file or a youtube link
I did an ugly solution
I added a class inside the input called
render-me
And ran setInterval
each 1 second
The function renders the input with class render-me
then removes that class
It worked
Hi @Dennis Koch
I found another solution
I used x-data with x-init for apline.js
Thanks