Inactive Submit button till all drop items are dropped

Hello my fellow Forum trollers,

My question is very simple. I want to make my custom submit button inactive till all the drop items in a drag and drop interaction are placed (all the holes are filled). The submit button only then becomes active so the user cannot submit a partially complete board.

How does one check if an item is 'dropped' or not? Any suggestions?

Thanks!

Holly

5 Replies
Holly Harris

To remedy this - set up drop areas just under the starting point of your draggable item. In options - remove the 'return to original position' option. (the wording isn't exact but that is the general idea) then ensure that draggable items always snap to a drop area.

Option 1:

If they are dropped on an answer drop area - evaluate a variable to true (logically tied to the draggable item) and if it is dropped in a starting drop area evaluate a variable to false. You can then check to see if each variable is true on a trigger "when dropped." This variable tracks if it is dropped - you then make a second variable to evaluate if it is correct. (I use "is01dropped" and "is01correct" as my variable names for each draggable item)

Option 2:

If they are dropped on an answer drop area, add +1 to a number variable (logically tied to the draggable item) and if it is dropped in a starting drop area detract -1 from the number variable. You can then check to see if the count of the variable matches the number of your draggable items on a "when dropped" trigger. You then make a second variable per draggable item to evaluate if it is correct. (I use "dropCount" and "is01correct" as my variable names)

Hope this helps. Rock on.