2

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?

2 Answers 2

4

The Meta Stack Overflow question Can I use the tag textbox script? might help.

It points people towards the plug-in Chosen.

Sign up to request clarification or add additional context in comments.

Comments

4

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.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.