Answer the question
In order to leave comments, you need to log in
How to exclude repetitions from one array?
I am writing a project on laravel and there is such a task:
Form, 2 fields with a choice of several categories. There is only one category array.
How can I make it so that when a category is selected in the first field - in the second field, this category is hidden from the selection.
Perhaps there are laravel solutions or js examples
I would be glad for any help!
Answer the question
In order to leave comments, you need to log in
Something like this https://jsfiddle.net/62ajfx1b/.
You can use attr('disabled', true) instead of css('display', 'none')
laravel is backend. Your task is frontend. Therefore it is natural - js.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question