= f.simple_fields_for :person do |ff|
  = field_set_tag "Person" do
    = ff.input :title
    = ff.input :given_name
    = ff.input :family_name

  = field_set_tag "Address" do
    - ff.object.build_address
    = ff.simple_fields_for :address do |fa|
      = fa.input :name
      = fa.input :street_1
      = fa.input :street_2
      = fa.input :city
      = fa.input :county
      = fa.input :postcode
      = fa.input :country, as: :string

= f.input :description_id, collection: contact_descriptions
= f.input :other_description
= f.input :notes, as: :text, input_html: { rows: 2 }

// Disable `for` attribute, so it works when multiple contact form on the page
= f.input :default_cc, label_html: { for: nil }

= f.simple_fields_for :person do |ff|
  = field_set_tag "Person" do
    = ff.input :title
    = ff.input :given_name
    = ff.input :family_name

  = field_set_tag "Address" do
    - ff.object.build_address
    = ff.simple_fields_for :address do |fa|
      = fa.input :organisation_name,
                 label: "Organisation",
                 placeholder: "E.g. general practice or hospital name (optional)"
      = fa.input :street_1
      = fa.input :street_2
      = fa.input :city
      = fa.input :county
      = fa.input :postcode
      = fa.input :country, as: :string

= f.input :description_id, collection: contact_descriptions
= f.input :other_description
= f.input :notes, as: :text, input_html: { rows: 2 }

// Disable `for` attribute, so it works when multiple contact form on the page
= f.input :default_cc, label_html: { for: nil }

Use address organisation name rather than name when adding contact
Use address organisation name rather than name when adding contact

airslie/renalware-core,airslie/renalware-core,airslie/renalware-core,airslie/renalware-core