Limiting interactivity with trigger driven drag and drop

I was feeling pretty good about myself.  I created a drag and drop activity using triggers, that would calculate responses for 4 separate categories, based on where an object is dropped.  It is a multiple question "survey" and I use temporary variables to hold the values of current slide... when "Next" button is clicked, the temporary variables are added to a permanent variable for each category... upon entering the next frame the temp variables are zeroed out, ready to begin again.  The "Next" button is disabled until all four objects are dropped... everything works great.

PROBLEM... the one thing I did not factor for was a user dropping multiple shapes on one category... for this to work it has to be limited to one shape per drop zone.  I have a reset button that zeroes everything out and returns objects to original position... but, once all four items are dropped, there is nothing preventing user from hitting "Next" with shapes in the wrong places.

I could add an instruction that each category needs a dropped item... but I really want to take it out of the user's hands.  I have spent the better part of the last two days trying to prevent the "Next" button from being enabled until all four drop zones have an item.  I figured this would be easier than limiting each drop zone to one item.

If anyone has any suggestions, I would appreciate your feedback.

3 Replies
Ashley Terwilliger

Hi James,

When setting up a drag and drop, there is a check mark within the "Edit drag and drop window" to "allow only one drag item in each drop target" if you enabled that, the drag item would return to it's starting location if you dropped a new drag item into the same drop target.

 Also, if you want the user to only be able to click "Next" when all the items are correct, you could either use the above check box to "return items to start location if dropped outside the correct drop target" or add some conditions to your trigger to check that all are correct before the next button is active. 

Let us know if you need anything else! 

James Raynes

Ashley... thanks so much for your response.  It's been a while but I thought I would share how I solved my dilemma.  Unfortunately I couldn't use the Freeform drag and drop feature.  Because of the multiple triggers needed there were too many limitations.  So I built using custom triggers. 

To prevent users from advancing without a shape on each drop zone:

  • First I disable the 'Next' button on timeline start. 
  • Then I created 4 new variables - one for each drop zone - and assigned a different value for each one (3, 7, 10 and 100... these numbers could be anything I think, as long as the value for each is different.). 
  • I created 1 more variable (call it "enable") to hold the sum of each drop zone as it is dropped on.
  • As something is dropped on each drop zone, I programmed a change variable trigger to add the value of each drop zone to enable variable after it is dropped on. 
  • The 'Next' button stays disabled until the value of the new variable is exactly equal to the sum of the four drop zones... in this case 120.  If someone dropped on any of the drop zones twice, the sum would not be exactly equal to 120 and the button would stay disabled
  • If user wants to reset, the "enable" variable is reset to zero and the shapes are returned to their original state.

This was one of many challenges that I encountered... but it is now functional.  I now have an interactive survey that calculates a score for 4 possible leadership styles, that is able to convert the results into a custom bar graph.

Though I didn't use Freeform d&d your insights definitely helped.

Thanks again.