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 7905243
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T10:24:07+00:00 2026-06-03T10:24:07+00:00

I have a drag and drop calendar that ‘on drop’ needs to pass the

  • 0

I have a drag and drop calendar that ‘on drop’ needs to pass the details into a variable.

So far i have managed to get it to append in a textarea so i can see it is recording the data fine or create one hidden field that will take the last drop.

However, I need each item to be in a hidden field so I can pass it onto the next page where it will then be processed in PHP.

I am guessing that i would need a loop of some kind so for each drop…generate hidden field.

But i am having no luck getting it to work.

Here is my code. Any help would be really useful.

Thanks

 drop: function(date, allDay) { // this function is called when something is dropped

            // retrieve the dropped element's stored Event Object
            var originalEventObject = $(this).data('eventObject');

            // we need to copy it, so that multiple events don't have a reference to the same object
            var copiedEventObject = $.extend({}, originalEventObject);

            // assign it the date that was reported
            copiedEventObject.start = date;
            copiedEventObject.allDay = allDay;

            // render the event on the calendar
            // the last `true` argument determines if the event "sticks" (http://arshaw.com/fullcalendar/docs/event_rendering/renderEvent/)
            $('#calendar').fullCalendar('renderEvent', copiedEventObject, true);


            //Record and add dropped items to list
            var txt = $("#listbox");
            var dtstart = copiedEventObject.start + '\n'
            var caltitle = copiedEventObject.title

            txt.val(txt.val() + dtstart); // For our reference - Remove later

                var input = document.createElement("input");
                input.setAttribute("type", "hidden");
                input.setAttribute("name", "dtstart");
                input.setAttribute("value", dtstart);

                //append to form element that you want .
                document.getElementById("calendarform").appendChild(input)

            // remove the element from the "Draggable Events" list
            $(this).remove();

        }
    });


});
  • 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-03T10:24:08+00:00Added an answer on June 3, 2026 at 10:24 am

    What you can do is to make the listbox a “ul” element as follows

    <ul id = "listbox"> 
    
     </ul>
    

    then add the following jquery to your function

    var txt = $('#listbox');     
    txt.append("<li class ='listItem'> "+dtstart +"</li>")
    

    at the end you will have a list of <.li>(dot is there otherwise it wouldn’t be shown in the answer) elements with the same class. Then you can get all the elements of class “listItem” and pass the values to your next page

    hope this answer is clear

    EDIT

    to get all the values in ‘listItem’ class you can do the following

    var listItems = $('.listItem');
    
    listItems.each(function(){
        // your code goes here for each record
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have two pairs of drag/drop/sortable lists using JqueryUI.http://jqueryui.com/demos/sortable/ My problem is that I
I have a drag/drop operation on a Canvas that is supposed to do something
I have a drag and drop code works perfectly on divs that have been
I have implemented drag-n-drop in a custom Calendar view in my application, which does
I have a drag and drop game that I am now considering changing. Basically
I need to create items that have drag and drop and sort functionality. So
We have implemented a drag and drop feature that shows a nice simple representation
I have created a nested list with drag/drop functionality. My issue is that I
I currently have a layout that uses Jquery UI Drag and Drop.. I have
I have some drag and drop functionality I am using in an xceed grid.

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.