How can I build a tag text box thing like here on Stack Overflow using Ruby on Rails?
Also, how do I handle the form post scenarios once the tags are submitted?
How can I build a tag text box thing like here on Stack Overflow using Ruby on Rails?
Also, how do I handle the form post scenarios once the tags are submitted?
If you will take a look on the tags on Stack Overflow - it's just an anchor with span inside for removing it. And of course, you need to style it.
<a href="#">My Tag
<span>X</span>
</a>
As for posting the form: Use jQuery and an Ajax request to post it to the server. More information is in jQuery.ajax().
Source code for a demo is at http://jsfiddle.net/Fj3zx/6/.
Also check out the Choosen plugin for jQuery.
The Meta Stack Overflow question Can I use the tag textbox script? might help.
It points people towards the plug-in Chosen.