Resetting Only Incorrect Answers in 'Select in Dropdowns'

Hi all;

A quick question: is it possible to clear/reset only the incorrect answers in a Select in Dropdowns question?

For example, I have a SID question with 5 dropdowns, the user gets three of them correct and two of them wrong. On clicking Submit, is there a way to clear only the two incorrect user inputs so they don’t have to do redo the whole question?

I’ve found an older post on doing the same with Drag-n-Drop questions, but I think those may have a bit more flexibility…?

It’s not a huge requirement, but if I can do it - and do it without too much complexity - it may be worth a go.

TIA!

Hi,

Please take a look at the sample project I’ve attached. It demonstrates how you can clear only the incorrect selections in a Select in Dropdowns question while keeping the correct ones.

Also, since the dropdowns use similar sets of actions, you may want to use Advanced Actions to avoid repeating the same actions for each dropdown. You can refer to this tutorial for more details:
How to Use Advanced Actions in ActivePresenter 10

Regards,
Hoa
Reset_Incorrect_Dropdowns.approj (2.3 MB)

1 Like

Thanks very much @Hoanp ! I will give this a try. On another note, is there a way to change the Disabled state so that it’s not a dark grey colour? I tried editing the state and adding a different one, but no luck.

Thanks again!

Yes, you can change the appearance of the Disabled state.

Since the object uses the built-in Disabled state when it is disabled, you need to edit this state directly rather than create a new state. Open Edit States, select the Disabled state, and customize its appearance as needed.

For more details, please refer to this tutorial: How to Change States of Objects in ActivePresenter 10

Regards,
Hoa

1 Like

Thank you for your reply @Hoanp. I did that first before trying to create a new state, but it didn’t work. I tried changing both the fill and the line (since the default heavy grey of the Disabled state is what I want to change), but only the line changes (see attached). Is there something I’m missing?

Thanks!

Hi,

Please select the Dropdown in the Disabled state, then go to the Format tab on the ribbon. From there, you can change the colors of the different Dropdown components, such as Background, Arrow Background, Arrow, Border, and Fill.

Regards,
Hoa

1 Like

Ah that’s better - thank you! I think that’s the first time I had to go up into the tab to change properties for an item’s state, so I didn’t think to try it. Thanks for the support @Hoanp :folded_hands:t2:

1 Like

Hi again @Hoanp - I’m sorry to come back with this but I can’t seem to get this to work. The solution you gave me worked for a single Select in Dropdown, but I’m trying to create a Select in Dropdowns (as I mentioned in my original post, I have one Select in Dropdowns with 5 dropdowns). In the file you attached, you have a single SID question on each page, and in Actions-Events > Add Events, there is an option for On Correct, but I don’t see that same option for individual dropdowns in a multi-dropdown question. I’m not sure if that’s clear…see below. Is there something I’m missing?

Thanks!

Hi,

Thanks for clarifying, and you’re right. My previous example was for separate Select in Dropdown questions, not a single Select in Dropdowns question containing multiple dropdowns.

For a Select in Dropdowns question, individual dropdowns do not have an On Correct event. Instead, you can use JavaScript on the parent question’s On Incorrect event.

First, give each dropdown a unique name in the Timeline pane, then add an Execute JavaScript action to the question’s On Incorrect event:

var answers = [
    ["Dropdown_3", "Hanoi"],
    ["Dropdown_5", "5"],
    ["Dropdown_7", "green"],
    ["Dropdown_9", "0"],
    ["Dropdown_11", "the Sun"]
];

answers.forEach(function (answer) {
    var dropdown = prez.object(answer[0]);

    if (dropdown.value() === answer[1]) {
        dropdown.disable();
    } else {
        dropdown.clear();
        dropdown.enable();
    }
});

Replace the dropdown names and correct answers with those in your project. The answer text must exactly match the text displayed in each dropdown.

Also, set Attempts to at least 2 so the learner can submit again.
Please see the attached sample project for reference.clear-incorrect-dropdowns.approj (1.1 MB)

1 Like

Excellent @Hoanp - this works perfectly, thank you!

1 Like