Open dinshawraje opened 9 years ago
I have given this in my view:
<div class="input-control select country_input" data-role="input-control"> <%= f.select :country, region_options_for_select(only_us_and_france),:prompt => 'Select Country' %> </div> <div class="input-control select state_input" data-role="input-control"> <%= render partial: 'subregion_select', locals: {parent_region: f.object.country} %> </div>
and in my subregion partial this:
<div id="account_state_code_wrapper" > <% parent_region ||= params[:parent_region] %> <% country = Carmen::Country.coded(parent_region) %> <% if country.nil? %> <div style="display: none">State</div> <% elsif country.subregions? %> <%= subregion_select(:account_detail, :state_code, parent_region) %> <% else %> <%= text_field(:account_detail, :state_code) %> <% end %> </div>
So its showing the name of countries and states but I want to show in my select option like Ak and Al so on for state also. Please help me out. Thanks in advance.
I have given this in my view:
and in my subregion partial this:
So its showing the name of countries and states but I want to show in my select option like Ak and Al so on for state also. Please help me out. Thanks in advance.