Changing a Select Dropdown to a Text field with Autocomplete

Asked

Viewed 26 times

0

Good morning,

I wonder if there’s any way to change one Dropdown with several options for a Text Field with fautocomplete.

My code for select dropdown is as follows:

<%= label_tag :aluno_id, "Aluno a ter Disciplina Liberada" %>
<%= select_tag "ofertas[liberacao][aluno_id]", options_for_select(@alunos, { prompt: "Selecione um Aluno" }), { :class => "form-control", :style => "width: 400px;" } %>
  • Try to exchange select_tag for datalist_tag see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/datalist

  • What language is this? Use tags to inform

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.