Question

I am looking for a way to use a textarea and get the values separated by commas, and place them into the array.

Really I am looking for how to auto format the textarea so when the user types something in it either forces or something a comma break. I want to use autocomplete, but I have no data to check it with since this will be a new user sign up.

What's the best approach?

Was it helpful?

Solution

var text = $('#mytextarea').val().split(" ");

OTHER TIPS

you can use this plugin to enforce seperation of item in textarea

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top