Forum Discussion

CarynMay's avatar
CarynMay
Community Member
5 months ago

State of the drag object not changing when dropped.

I have a quick drag and drop interaction that I'm trying to help a colleague with, but it is just not working as desired. There are boxes acting as drop targets and groups consisting of text boxes and icons, as the drag objects. What should happen is that when the object is dropped on one of the correct targets the background of the textbox should change to green and to red when dropped on an incorrect target.

It seems very straight forward, but the state doesn't change. I created a test box and it's state changes when I drop the item, but the same trigger doesn't work on the textbox. I attached a video showing the issue and the .story file.

  • AndrewHanley's avatar
    AndrewHanley
    Community Member

    Hi Caryn

    Firstly, I love your video clearly explaining the issue! Good job :)

    First thing I wonder is if you have simply not selected the Drop States to show until the interaction is submitted?

    You can change this in the Drag & Drop Options popup box available from the ribbon bar.

    Untick the very last option there - it says "delay Drop feedback....."

    Does that now work?

  • CarynMay's avatar
    CarynMay
    Community Member

    No, that's was what I thought when I was looking at my colleague's original file. It's unchecked.

  • AndrewHanley's avatar
    AndrewHanley
    Community Member

    I downloaded your Storyline file and thankfully, this one is easy to diagnose and fix.
    You dont have any "correct" drop targets for any of your draggable objects!?!

    Essentially that means that Storyline has no idea what is correct or incorrect.

    Simply go in to Form View, and make sure that every Drag Item has a Drop Target.... bosh! its working :D

    • SarahHintze's avatar
      SarahHintze
      Community Member

      I am the colleague and original creator. I originally had it set up that way but the goal of the project is to have multiple correct drop zones like the triggers show, however the states are not changing and that is the issue. 

      • EricSantos's avatar
        EricSantos
        Staff

        Hi Sarah,

        Happy to chime in! Only one drop target can be assigned for each drag item in Storyline. I'd open the floor to Andrew and other community members for a workaround they may be applying to use more than one drop target.

        A pick-one interaction is usually used for this purpose. You may check out this discussion in which our incredible hero, Walt, shares possible ways to achieve this with a sample Storyline course you can look into. Please don't hesitate to reach out if you have additional questions.

  • AndrewHanley's avatar
    AndrewHanley
    Community Member

    Hi Sarah, apologies I did not see your response for some reason. Im glad Eric has replied, and yes, he is spot on - Storyline only allows for one correct drop location per draggable item.

    (bummer!)

    @Eric - I think your link to Walt's discussion solution hasnt come through (or at least it isnt clickable for me)

    @Sarah - Ive had to code up things like this in the past where draggable items can be in multiple locations, but it is ALWAYS hard and complex because not only are you setting the triggers manually for the interaction, you also have to fight against Storyline a bit, as it tries to "help" by constantly putting it the default functionality!

    If I could offer advice, first set up Storylines form view to have all your draggable items BUT ONLY ONE ITEM HAS A DROP ZONE ASSOCIATED WITH IT (this will leave the rest without a correct drop location)

    Then uncheck the option for Storyline to show the feedback states. You will have to control that yourself. Simply set up a trigger for each item to show the correct/incorrect state based on the drop zones you have.

    Next, only allow the SUBMIT button to be clickable when they get all the drop items in the correct locations.

    And that should work. Essentially, you have a drag and drop with only 1 item that Storyline checks to see if its correct or not.  You manually check the rest.

    Good luck! ;)