Go Back   CodingForums.com > :: Client side development > JavaScript programming > JavaScript frameworks

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 02-13-2013, 10:37 PM   PM User | #1
itxtme
Regular Coder

 
Join Date: Jun 2009
Posts: 102
Thanks: 3
Thanked 16 Times in 16 Posts
itxtme is an unknown quantity at this point
jquery Sortable - cant serialize data

I have a sortable list that I want to save the items group. To be clear

List A
item 1
item 3

List B
item 2

I move item 2 into list B, then I need to save the fact that item 2 is in list B.

I have a form where I want, once the submit button is pressed, the lists orders to be saved as data and placed within the form for submission (hidden input) as a value.

I have tried to use the "toArray( options )" for the sortable UI, however I am using it in conjunction with a plugin to make it multi-selectible. I cannot for the life of me get the array into the from.

I have the basic setup in a jsfiddle

Any help much appreciated for this Jquery Noob
itxtme is offline   Reply With Quote
Old 02-14-2013, 12:26 AM   PM User | #2
itxtme
Regular Coder

 
Join Date: Jun 2009
Posts: 102
Thanks: 3
Thanked 16 Times in 16 Posts
itxtme is an unknown quantity at this point
Took the dog for a walk when I had my sudden epiphany, put the inputs within the <li> items.

Code:
<li><input name="Item12" type="hidden" value="12" />Item 12</li>
I then use the form normally as I would any other content.

Working perfectly
itxtme is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 03:21 PM.


Advertisement
Log in to turn off these ads.