ruby on rails - Incorporating Bootstrap Form Helpers into simple_form -


i trying implement select menu countries, filters select menu states once country selected.

i use simpleform , bootstrap following seems suit me perfectly: http://vincentlamanna.com/bootstrapformhelpers/state.html

i use country_select gem simpleform , code contains:

<%= f.input :country, :id => "business_country", :input_html => { :class => "span6" } %> <%= f.input :state, :input_html => { :class => "span6" } %> 

when included relevant js files , include default sample code bootstrap form helpers behaviour works expected include in simpleform can save database. here default example code performs correctly:

<select id="countries_states1" class="input-medium bfh-countries" data-country="us"></select> <select class="input-medium bfh-states" data-country="countries_states1"></select> 

could suggest how implement simpleform?

thanks.

did follow instructions on simple_form gem readme install bootstrap support? https://github.com/plataformatec/simple_form#twitter-bootstrap

rails generate simple_form:install --bootstrap


Comments

Popular posts from this blog

c# - DetailsView in ASP.Net - How to add another column on the side/add a control in each row? -

javascript - firefox memory leak -

Trying to import CSV file to a SQL Server database using asp.net and c# - can't find what I'm missing -