<%= form_for controller, method: :post, url: url do |f| %>
  <fieldset class="country-picker js-country-picker box font-xsmall">
    <div class="country-picker-container">
      <%= f.label :country, 'Trade between the UK and' %>
      <%= f.hidden_field :anchor, value: anchor %>
      <%= f.select :country, f.object.countries.map{ |c| [c.long_description, c.id] }, { include_blank: 'All countries' }, class: 'js-country-picker-select' %>
      <a class="reset-country-picker" href="#reset-country-picker" title="Reset country picker" rel="nofollow">Reset<span class="long-text">&nbsp;to all countries</span></a>
    </div>
    <%= f.button 'Set country', class: 'button search-submit' %>
  </fieldset>
<% end %>

<%= form_for controller, method: :post, url: url, namespace: anchor do |f| %>
  <fieldset class="country-picker js-country-picker box font-xsmall">
    <div class="country-picker-container">
      <%= f.hidden_field :anchor, value: anchor %>
      <%= f.label :country, 'Trade between the UK and' %>
      <%= f.select :country, f.object.countries.map{ |c| [c.long_description, c.id] }, { include_blank: 'All countries' }, class: 'js-country-picker-select' %>
      <a class="reset-country-picker" href="#reset-country-picker" title="Reset country picker" rel="nofollow">Reset<span class="long-text">&nbsp;to all countries</span></a>
    </div>
    <%= f.button 'Set country', class: 'button search-submit' %>
  </fieldset>
<% end %>

Add namespace to avoid id collisions
Add namespace to avoid id collisions
