所以我有引导折叠,在里面我有标签,在其中一个标签里面我有一个带有 text_field 的表单,它有引导输入,问题是输入的下拉菜单不会超过折叠。
具有自动完成功能的 text_field 是其中的最后一个元素。
这是图片。
我希望下拉菜单在折叠元素下方展开(在图片上的线条下方)
编辑:这是该视图的haml
- @i = 0
- @trainings.each do |training|
- @i = @i+1
.accordion#accordion2
.accordion-group
.accordion-heading
%a{:class => 'accordion-toggle', 'data-toggle' => 'collapse', :href => "#collapse#{@i}"}
= "Training #{@i}"
%div{:id => "collapse#{@i}", :class => 'accordion-body collapse'}
.accordion-inner
%pre= "Description: #{training.description}"
%ul.nav.nav-tabs#myTab
%li.active
%a{"data-toggle" => "tab", :href => "#planirano#{@i}"} Planirano
%li
%a{"data-toggle" => "tab", :href => "#napravljeno#{@i}"} Napravljeno
.tab-content
%div{:class => 'tab-pane active', :id => "planirano#{@i}"}
- training.exercises.each do |exercise|
%pre= "#{exercise.element.name} | #{exercise.description} | #{exercise.number_of_series}"
= form_for :training_exercise, :url => training_exercises_path(:training => training.id), remote: true, html: {:class => 'form-inline'} do |f|
= f.label :exercise
= f.text_field :exercise, :id => 'add_training_exercise'
= f.button :Add, :class => 'btn'
%div{:class => 'tab-pane', :id => "napravljeno#{@i}"} to sam napravio
f.text_ifeld :exercise, :id => 'add_training_exercise' 是我要询问的带有自动完成功能的字段。
编辑: