Option create new #9

Closed
gentoo-pl opened this Issue Oct 11, 2012 · 3 comments

Comments

Projects
None yet
3 participants

I try to enable option adding using instructions from : harvesthq/chosen#166
but it doesn't work and I have no error. Is it supported?

My mistake. Solved. I tried to use it on select field. On text field works well

gentoo-pl closed this Oct 11, 2012

Hi, how did you add it?

I tried with this code but it didn't work, it appears like a single chosen.

I'm using Single Form, and I'm trying to find how to make it work with textfield.

View
<%= f.input :tag_list, collection: Post.tag_counts_on(:tags), input_html: { multiple: true } %>

Javascript
$(function() {
$("#post_tag_list").chosen({
create_option: true,
persistent_create_option: true
});
});

Do you have any difference?

Owner

tsechingho commented Feb 18, 2013

I add a section of how to enable chosen to readme, please take a look.
https://github.com/tsechingho/chosen-rails#enable-chosen-javascript-by-specific-css-class

pablomarti, I guess you may forget to add //= require chosen-jquery to your application.js

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment