Skip to content

Listener and target select multiple #2836

Answered by tabuna
edmaSB asked this question in Q&A
Discussion options

You must be logged in to vote

In HTML, multiple fields can have names with "[]". For example, if a field was named 'cliente_id', it would be written as <input name="cliente_id[]">. To connect the target 🎯, you need to add a dot at the end. Example code:

protected $targets = [
    'client_id.',
];

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by edmaSB
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants