Drag and Drop - making submit button appear only when all drag items are on an answer option

Feb 08, 2022

Hi there! :)

First of all, sorry if this is confusing! I attached my work file below. :)

I'm running into an issue with my drag and drop "validate" (aka submit) button.

I want my submit button to be hidden until the user places all "drag" shapes in a "answer" white box shape. Doesn't matter if it's the right one or not. When they're all placed on a white box, the button appears and they can validate and see which answers they got wrong or right.

If some of the answers are wrong, they can try again and all the answers snap back into the start position. They can only attempt this two times and then the answer sheet shows up.

My submit button appears as intended when all of my answers are on a white rectangle, and I made it so that if the user drops the answer back onto any other surface on the slide, the submit button disappears again.

I'm no expert yet, but I made it so if drag 1, 2, 3, 4 and 5 are true, the submit button becomes active. If drag 1, 2, 3, 4 or 5 are false, the button disappears.

The issue I have is that if I place all of my answers, then decide to pick up, for example, 1 drag and drop it over 2 drag (which would be common if a student wants to change their answer), 2 drag goes back to it's original position (aka not on a valid white answer rectangle), but the submit button stays.

Because drag 2 wasn't "dropped back" by the user, but instead just appears back to it's original position, the value of drag 2 = true doesn't change to false, as it would if it was manually dropped there.

I tried making the value false if all of the drag object intersects with an invisible rectangle on their initial position, and this might be a bug, but in this specific scenario where the object just snaps back into place, the object intersecting aren't working.

I've tried sooo many different things at this point and have no clue what I should do. :( Any help would be appreciated.

short ask: All I want is for my submit button to appear when all the drag shapes are on the answer shapes, and if one is out of place the user can't submit the answer. :)

 

1 Reply
Veronica Budnikas

Hi Annie,

Not the exact solution you want, but when I have more complex drag and drops and come up with issues like this, I sometimes add a RESET button so that the learner can reset everything to the original starting point if they want to change their answers. So, when the learner drops a drag onto a target, I trigger the drag to item to turn to Disabled. Then, once all are disabled, the Validate button can turn to Normal. and the Reset button is there all the time if the learner wants to start over (it's usually a Jump to his slide trigger, with the slide set to Reset to initial state). Not ideal if you have many items, but might work with only 5?

For me, I feel this gives me more control as there is too much that can go wrong with users dragging objects all over the screen.

Still I'll think a bit more about this and let you know if I come up with something better, and others may have a better solution.