Skip to main content
Inspiring
October 16, 2017
Question

Is there a way to prevent submit on a drag and drop until it has been completed?

  • October 16, 2017
  • 1 reply
  • 627 views

Hello,

I am using a drag and drop as one of the questions included in my quiz, and I want to prevent that the user clicks Submit (and with it move to the next slide) until all of the drop boxes have something in it.

What DID NOT WORK:

  • I covered the submit button with a transparent smart shape in the hopes to make it unclickable... (I dont think this will ever work)
  • I gave each drop box a variable, and when an object was placed in it, toggled the value of the variable to 1
  • After each drop, it was checked to see if all of the drop boxes have something in them, and if so, remove what was covering the submit button.

Any other ideas?

This topic has been closed for replies.

1 reply

Lilybiri
Legend
October 16, 2017

Something is missing in your description: is it scored or not? Did you set correct answers?

You can use the object actions to assign the value 1 for the variable associated with that drop target.

When the Submit button is clicked, the actions On Success (or Last attempts) will be executed. You can use those actions to check if all the variables were toggled to 1. If not, it depends on the situation of the D&D slide. If it is treated as a KC slide, rather easy: reset everything by re-entering the slide (look at Replay slide, second scenario in Replay (slide) Button - Captivate blog

Another way would be to show a warning, with each object action: text telling how many drag actions have been done, and how many still have to be done. 

Inspiring
October 17, 2017

Hello,

Hmmm.  I tried something else, but still haven't figured it out.

I am still using object actions to assign the value to 1 for the variable associated with that drop target. This way I can check the variable values to see if all of the drop boxes are filled.

Because I want the user to have a second chance to complete the drag and drop (or as many chances he needs), I set the number of attempts to infinite.

On Failure (is this ever called when there are inifinite attempts?), I have an advanced action which checks to see if all of the "drop" variables have a value of 1, and if they do, to jump to next slide....  Like I said, the point is to make sure he completes the drag and drop before submitting - it doesnt matter if what he submitted is correct or not.

It seems like this should work unless On Failure is not called with number of attempts is set to infinite.

PS Correct answers are set.

Inspiring
October 17, 2017

Something else I tried,

I limited the attempts to one and On Failure, if all of the drop boxes have a value of 1, jump to the next slide, if not jump to the same slide again (the drag and drop slide).  Is there a way to reset the drag and drop, so that this solution will work?

Ryan