Forum Discussion

JessicaKellerma's avatar
JessicaKellerma
Community Member
9 days ago

Triggers on a submit button for drag and drop

Hi all! 

Hoping someone here has needed to do this before and has an idea! 

I have a drag and drop slide that I want all the drag options to be on screen at the same time (not appear one at a time as we often do for slides where space is an issue). The slide is intended to get the reader to engage better with the content and review the strategies explained a couple of slides back. 

Now the challenge I have is space and position...want to keep button bottom right as this is where it best fits on the other interactive slides. So I want to have the submit button and hidden and change it to "normal" when all the drag items have been dropped whether they are correct or not. There could be so many combinations, I can't work out a simple and logical way to get a trigger to work for that.

Any ideas?

Thanks in advance.

Jessica

  • Start with the Submit button in Hidden state

    Create the trigger:

    Change state of Submit to Normal When Object 1 is dropped on [any of the targets] if Object 2 is Drop 
    Correct Or Object 2 is Drop Incorrect And Object 3 is Drop Correct OR Object 3 is Drop Incorrect And etc.

    You will need one of these triggers for when each object is dropped.

    I think this will work, but I’m not currently with SL to test it. It depends on how it combines the Ors and Ands. If it bunches the ORs, then The ANDS, it will work. If it just runs through linearly, it probably won’t. In that case, you will have to create the checking one step at a time. Unfortunately, SL doesn’t have a Dropped state at this time, so you will need a variable for each object to show if it is either Dropped Correct or Drop Incorrect. Then each time an object is dropped, check the other objects to find their state and set their variable, then another trigger to show Submit if all the variables are True.

  • Hi Walt

    Thanks for taking the time to reply. It seems the ORs and ANDs may be bunched as even a much simplified version of your suggestion doesn't work. I've submitted a support case and will post the solution here once received. Else I may just need to cut down options on that slide! I am intrigued whether it can work though...

    • LucianaPiazza's avatar
      LucianaPiazza
      Staff

      Hi JessicaKellerma

      Great call opening a support case. I see that you're working with my colleague Mick. You're in excellent hands!

      We'll continue the conversation over in your case. 

      Have a great afternoon! 

  • Thanks Luciana

    Yes, Mick made a suggestion, though as I started suspecting it requires a very elaborate setup! 

    I've opted for just removing one of the prevention strategies so there is enough space for the submit button, but here is Mick's advice, for anyone who comes across this thread at a later date in need of the same or similar solution:

    You will require T/F variables for each drop target that will change value when the learner drops the object on any drop target.

    1. You need variables that will correspond to your Drag objects like this:
    https://sharing.articulate.team/OAuvqb1G

    These variables will change in value when the learner drops these to the target objects:
    https://sharing.articulate.team/kpuvbLx7

    2. Then you need a Toggle Trigger that will change to True, which will cause the state change to happen. It will also include T/F conditions, so it will only be satisfied when all T/F variables corresponding to each drag and drop item are all true, meaning all drag items have been moved to all drop targets.

    https://sharing.articulate.team/nOu2k82Q

    • LucianaPiazza's avatar
      LucianaPiazza
      Staff

      I'm so glad that Mick could discuss this with you, Jessica! Thank you for sharing in this thread, I'm sure it will be helpful to folks in a similar situation! 

      If any other questions or discoveries come up along the way, feel free to reach out in the community!