Pre populated Drag and Drop

I was wondering if would it be possible to create a Drag n Drop that starts with some drag objects already placed in the drop zones and then the user should be able to move the objects to other drop zones.
I am currently trying to achieve this with JS by adding the objects to the dropped Objects array when the slide loads, but that does not seem to work.
Any help would be much appreciated.

AP version: 9.0.5

Thank you

Hi Rafael, sorry to butt in…
I don’t speak your language, so I don’t know if I’m getting this right, but from what I’ve read you shouldn’t need JS,
DRAG-N-DROP elements can be moved and spaced as you wish, so in between you can insert simple objects, just where you want the already placed elements to appear.

1 Like

Hi Betty, thank you for replying.
Perhaps I did not explain well. The idea is to start the activity with the dragable objects already dropped into their drop zones as they were dragged already. Then, the user should be able to relocate the objects or even drag them out of the drop zones.

We can think about it as preloaded drop zones. I hope that helps.

Ah that’s it… then I didn’t understand correctly… but I’m curious… can I ask you for what purpose the user will have to drag the objects out of the release zone?

1 Like

This can be useful to show a starting scenario that is incorrect and the Drag and Drop feature will allow the user to drag the items to the correct position and realize the solution without starting from the scratch.

1 Like

Thanks for the clarification Rafael, interesting your idea.
I have tried it, but I don’t know if it is exactly what you intend to do, then I give up and leave it to the experts.
I am attaching the file
drag-n-drop.approj (340 KB)

1 Like

I Really appreciate your support. Although I could not open your file since it requires AP version 9.1.0 which is newer than mine.
Thank you for taking the time to try.

1 Like

Hi @Rafael,

This sample could be the one you are seeking for: Drag and drop question type help! - #6 by ToanLS

Additionally, you need to add a script in the slide’s On Load event instead of clicking show answer to run script. If you have a license for version 9, you can freely update to the latest 9.x version.

Best regards,

1 Like

Hi Hang!

That is exactly what I needed. Thank you very much for responding so quickly.

1 Like