9
9
9karamba2019-04-22 09:24:03
Ruby on Rails
9karamba, 2019-04-22 09:24:03

How to create a select like in Avito?

5cbd5dda39147169640745.jpeg
So that both the category and subcategory are displayed, but that the category is disabled

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Anatoly, 2019-04-22
@9karamba

Read here

grouped_options = [
  ['Group 1',
    ["Item 1", "Item 2", "Item 3"]],
  ['Group 2',
    ["Item 1", "Item 2", "Item 3", "Item 4"]]
]
grouped_options_for_select(grouped_options)

R
Roman Mirilaczvili, 2019-04-22
@2ord

Select2
5cbd9b8c702a2760989284.png

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question