Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9262945
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T13:28:02+00:00 2026-06-18T13:28:02+00:00

I’ve been using the tag-it plugin from https://github.com/aehlke/tag-it (demo – http://aehlke.github.com/tag-it/examples.html ). In this

  • 0

I’ve been using the tag-it plugin from https://github.com/aehlke/tag-it (demo – http://aehlke.github.com/tag-it/examples.html).

In this code there is an option to display the inputted tags in another input, textarea etc. First option –

        $('#singleFieldTags').tagit({
            availableTags: sampleTags,

            singleField: true,
            singleFieldNode: $('#mySingleField')
        });

Here the id – #singleFieldTags is the inputting field which is a list like <ul and id – #mySingleField displays the ‘list-ordered’ tags with commas between each.

All the tags that are added and removed in the #singleFieldTags appear in the #mySingleField. Since there is no built-it sortable function with tag-it, adding a sortable() to change the order of tags in #singleFieldTags, does not change the order of tags in #mySingleField.

The second option is a plain with only #singleFieldTags as follows :-

        $('#singleFieldTags').tagit({
            availableTags: sampleTags,
        });

Although in tag-it.js there is a , the value does not appear in the mysql table after submitting the php form as the above list of tags is placed between <li></li>.

How is it possible to make the tags sortable and ensure that the same arrangement of tags in the list field <ul to be displayed in the <textarea as in First Option? Or How can the second option of sorting tags within a single field <input work and enabling it to be submitted by a form?

EDIT: There is a similar plugin like Tag-it called tagit here: http://webspirited.com/tagit/ . This plugin has sortable with an input box meaning if the tags were interchanged, and when submitted on form it would appear in the order of the sort. However, the disadvantage being that it has custom themeroller themes these are not similar and cannot even be linked to the ones at jQuery UI (jqueryui.com).

But on the other hand, the tag-it plugin (not tagit), can be loaded with these themes but does not provide the sortable function.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T13:28:03+00:00Added an answer on June 18, 2026 at 1:28 pm

    Here’s a solution that uses the tag-it plugin, because I understand that your missing functionality is explained in your quote “…adding a sortable() to change the order of tags in #singleFieldTags, does not change the order of tags in #mySingleField“.

    In order to have “#mySingleField” reflect the new sort order, I’m adding a handler to the stop event of sortable():

    $('#singleFieldTags').sortable({
        stop: function(event,ui) {
            $('#mySingleField').val(
                $(".tagit-label",$(this))
                    .clone()
                    .text(function(index,text){ return (index == 0) ? text : "," + text; })
                    .text()
            );
        }
    });
    

    and

    $('#singleFieldTags2').siblings(".tagit").sortable({
        stop: function(event,ui) {
            $('#singleFieldTags2').val(
                $(".tagit-label",$(this))
                    .clone()
                    .text(function(index,text){ return (index == 0) ? text : "," + text; })
                    .text()
            );
            console.log( $('#singleFieldTags2').val() );        // just for reference
        }
    });
    

    Here is a jsfiddle that demonstrates the functionality
    (added functionality for single input field)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I'm trying to convert HTML to plain text. I get many &\#8217; &\#8220; etc.
I'm not entirely sure how I managed to jack this up. http://pretty-senshi.com If you
I have thousands of HTML files to process using Groovy/Java and I need to
I am using jsonparser to parse data and images obtained from json response. When
I have a .ini file as follows: [playlist] numberofentries=2 File1=http://87.230.82.17:80 Title1=(#1 - 365/1400) Example
I have a jquery bug and I've been looking for hours now, I can't
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I am using JSon response to parse title,date content and thumbnail images and place

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.