From 1ea0467811558c8372e1e6ac5a5f1b8edc35ff2b Mon Sep 17 00:00:00 2001 From: baarkerlounger Date: Sat, 25 Sep 2021 17:23:33 +0100 Subject: [PATCH] Adjust radio button size based on number of answer options --- app/views/form/_radio_question.html.erb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/views/form/_radio_question.html.erb b/app/views/form/_radio_question.html.erb index 9e553b13a..0a6b38417 100644 --- a/app/views/form/_radio_question.html.erb +++ b/app/views/form/_radio_question.html.erb @@ -1,6 +1,7 @@ <%= f.govuk_radio_buttons_fieldset question_key, legend: { text: question["header"], size: "l" }, - hint: { text: question["hint_text"] } do %> + hint: { text: question["hint_text"] }, + small: (question["answer_options"].size > 5) do %> <% question["answer_options"].map do |key, val| %> <% if key.starts_with?("divider") %>