adonis-support-ticket icon indicating copy to clipboard operation
adonis-support-ticket copied to clipboard

dropdown

Open oluwabukolatina opened this issue 6 years ago • 3 comments

kindly fix the categories in the dropdwon to create tickets.

oluwabukolatina avatar Mar 01 '18 15:03 oluwabukolatina

What exactly is the issue?

ammezie avatar Mar 01 '18 18:03 ammezie

you used form builder which is not supported in the latest version. therefore, the dropdown will not reveal items.

oluwabukolatina avatar Mar 01 '18 23:03 oluwabukolatina

Assuming you have gotten categories as:

const categories = await Category.pair('id', 'name')

 return view.render('tickets.create', { categories: categories })

Then in the view, you can do something like:

<select>
  @each((name, id) in categories)
    <option value="{{ id }}">{{ name }}</option>
  @endeach
</select>

ammezie avatar Mar 02 '18 12:03 ammezie