From 0547be6016d1b1e7c0888b943d7a56ff105642e1 Mon Sep 17 00:00:00 2001 From: maebeale Date: Wed, 17 Jun 2026 13:20:55 -0400 Subject: [PATCH 1/2] Hide "Other" payment method on registration forms MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The "Other" option offered no clear meaning to registrants and added noise to the payment choice. Keep it in code and form data — the scholarship flow still relies on it as the stored payment method — but filter it out of the options surfaced on the public registration and bulk payment forms, preserving it only when it's already the selected value (e.g. the scholarship preset). Co-Authored-By: Claude Opus 4.8 --- app/services/form_builder_service.rb | 7 ++++- app/views/events/bulk_payments/new.html.erb | 3 ++- .../public_registrations/_form_field.html.erb | 6 +++++ .../events/public_registrations/new.html.erb | 2 +- .../events/public_registrations_spec.rb | 27 +++++++++++++++++++ 5 files changed, 42 insertions(+), 3 deletions(-) diff --git a/app/services/form_builder_service.rb b/app/services/form_builder_service.rb index 33f4a607d..eb715005b 100644 --- a/app/services/form_builder_service.rb +++ b/app/services/form_builder_service.rb @@ -3,7 +3,12 @@ class FormBuilderService # charge, so controllers match against PAYMENT_METHOD_PAY_NOW rather than # repeating its label. Keep this the single source of truth for the label. PAYMENT_METHOD_PAY_NOW = "Credit card (now)".freeze - PAYMENT_METHOD_OPTIONS = [ PAYMENT_METHOD_PAY_NOW, "Credit card (later)", "Check", "Other" ].freeze + # "Other" is retained as a payment method in code and form data — the scholarship + # flow stores it as the payment method — but it is intentionally hidden from the + # options surfaced on public forms for now (see the public registration and bulk + # payment views, which filter it out). + PAYMENT_METHOD_OTHER = "Other".freeze + PAYMENT_METHOD_OPTIONS = [ PAYMENT_METHOD_PAY_NOW, "Credit card (later)", "Check", PAYMENT_METHOD_OTHER ].freeze SECTIONS = { person_identifier: { label: "Person identifier", method: :build_person_identifier_fields }, diff --git a/app/views/events/bulk_payments/new.html.erb b/app/views/events/bulk_payments/new.html.erb index 8896b0ea7..6c3ff481f 100644 --- a/app/views/events/bulk_payments/new.html.erb +++ b/app/views/events/bulk_payments/new.html.erb @@ -134,7 +134,8 @@ <% if field.required %>*<% end %>
- <% field.form_field_answer_options.includes(:answer_option).each do |ffao| %> + <%# "Other" is kept in code/data but hidden on the form for now. %> + <% field.form_field_answer_options.includes(:answer_option).reject { |ffao| ffao.answer_option.name == FormBuilderService::PAYMENT_METHOD_OTHER }.each do |ffao| %>