Open frankieroberto opened 8 months ago
One option is to have separate helpers for the form group and the label:
<%= f.govuk_form_group :price do %>
<%= f.govuk_label :price, "Price" %>
Content
<%= f.govuk_text_field :price, label: nil, form_group: nil %>
More content
<% end %>
Another option is to add before_input and after_input options to the existing helper, which would more closely follow the Nunjucks macro, but is maybe a bit unconventional for Rails?:
<%= f.govuk_text_field :price,
label: { text: "Price" },
form_group: { before_input: "Content", after_input: "More content" }
%>
This feature was added to the Nunjucks macros in Add beforeInput(s) and afterInput(s) options to form groups (#4567).
We could consider how we might support this too.