Skip to content

Select elements rendered with bootstrap_select_group are stacked vertically by default #762

@marcospedro97

Description

@marcospedro97

My use case is the bellow form:

<%= form.date_select :birth_date, start_year: Date.today.year - 20, end_year: Date.today.year %>

There's no customization for me to set it as a row, it will alway provide something like

<div class="mb-3">
  <label class="form-label required" for="pet_birth_date">Birth date</label>
  <div class="rails-bootstrap-forms-date-select">
    <select id="pet_birth_date_1i" name="pet[birth_date(1i)]" class="form-select">
      [options]
    </select>
    <select id="pet_birth_date_2i" name="pet[birth_date(2i)]" class="form-select">
      [options]
    </select>
    <select id="pet_birth_date_3i" name="pet[birth_date(3i)]" class="form-select">
      [options]
    </select>
  </div>
</div>

It's not possible to add any classes to the wrapper #rails-bootstrap-forms-date-select, this will affect all elements built using BootstrapForm#BootstrapForm#form_group_content_tag since it does not merge any of the html options to the div.tag class

Did I misunderstood something? Any plans of adding this? I can work on it if possible

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions