maxwells / bootstrap-tags

Bootstrap-themed jquery tag interface
MIT License
550 stars 134 forks source link

support for removeOnly besides readOnly #29

Closed jogaco closed 9 years ago

jogaco commented 10 years ago

How can I have a list of tags which can only be removed? I do not want the user to add any more tags, but only remove.

maxwells commented 10 years ago

I think I'm willing to implement this. Seems like the best option is to lay it out like readOnly (in that there would be no input), but retain the (x) click to delete buttons for each item. What do you think about that?

jogaco commented 10 years ago

Great!

mwakerman commented 9 years ago

I've achieved this by:

  1. To disable the input field: $(input.tags-input).prop('disabled',true);
  2. To style the input field so it's "invisible":
.tags-input {
    border: none;
}

.form-control[disabled]{
    background-color: transparent;
    cursor: default;
}
jogaco commented 9 years ago

Thanks for the tip