diff --git a/config/forms/2021_2022.json b/config/forms/2021_2022.json index 8e81ac28c..7dcd455e4 100644 --- a/config/forms/2021_2022.json +++ b/config/forms/2021_2022.json @@ -214,7 +214,7 @@ } } }, - "last_settled_home":{ + "reason_for_leaving_last_settled_home":{ "header": "Leaving their last settled home", "description": "", "questions":{ @@ -257,8 +257,16 @@ "31": "Other", "32": "Do not know", "33": "Prefer not to say" + }, + "conditional_for": { + "other_reason_for_leaving_last_settled_home": ["Other"] } }, + "other_reason_for_leaving_last_settled_home": { + "header": "Please state the reason for leaving last settled home", + "hint_text": "", + "type": "text" + }, "benefit_cap_spare_room_subsidy": { "header": "Was the reason for leaving because of the benefit cap or removal of the spare room subsidy?", "hint_text": "", diff --git a/db/migrate/20211005115813_add_conditional_fields_to_case_logs.rb b/db/migrate/20211005115813_add_conditional_fields_to_case_logs.rb index c4c6a65fd..6f8c68a01 100644 --- a/db/migrate/20211005115813_add_conditional_fields_to_case_logs.rb +++ b/db/migrate/20211005115813_add_conditional_fields_to_case_logs.rb @@ -2,6 +2,8 @@ class AddConditionalFieldsToCaseLogs < ActiveRecord::Migration[6.1] def change change_table :case_logs, bulk: true do |t| t.column :outstanding_rent_or_charges, :string + t.column :other_reason_for_leaving_last_settled_home, :string + t.rename :last_settled_home, :reason_for_leaving_last_settled_home end end end diff --git a/db/schema.rb b/db/schema.rb index 356db48e3..fb810f511 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -59,7 +59,7 @@ ActiveRecord::Schema.define(version: 2021_10_05_115813) do t.string "person_8_gender" t.string "person_8_economic" t.string "homelessness" - t.string "last_settled_home" + t.string "reason_for_leaving_last_settled_home" t.string "benefit_cap_spare_room_subsidy" t.string "armed_forces_active" t.string "armed_forces_injured"