• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers

Slides don't reset when revisiting

Community Beginner ,
May 26, 2021 May 26, 2021

Copy link to clipboard

Copied

Hello! I made a custom branching logic scenario for users and I want them to be able to re-take it if they end up with a rare fail (let's please not debate this fact, it makes sense here, trust me!) The issue is, when I have the user jump back to the start, the elements on the slide don't refresh as if it's the first time visiting it - all my buttons are still hidden from the advanced actions the first time after they selected an option, etc.

 

The question is - How can I have all slide elements reset as if it's the user's first time visiting it when they go BACK to a slide they've already viewed?

Views

219

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
May 26, 2021 May 26, 2021

Copy link to clipboard

Copied

Simple.  Just have an Advanced Action executed On Enter of the first slide that resets the visibility of each object as it should be.  So if the object is supposed to be hidden on entering the slide, then have a line item in the Advanced Action that hides it.  If it is supposed to be SHOWN on entering the slide, then have an action line that shows it.

 

Captivate doesn't automatically do this for you because it doesn't know how your design is supposed to work.  Only YOU know that.  So it's up to you to build it to work that way.

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
May 26, 2021 May 26, 2021

Copy link to clipboard

Copied

You will need an On Enter action to reset some items. For that reason I plead since many years to avoid using show/hide when it can be done with a multistate object. It is much easier to have such an object reset automatically to the Normal state without needing any action.

Other items are reset automatically when you re-enter a slide. You'll read some more details in this blog post:

http://blog.lilybiri.com/replay-or-reset-slide

There are several blogs which I wrote explaining how to replace show/hide by multistate objects.

 

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
May 26, 2021 May 26, 2021

Copy link to clipboard

Copied

To calrify, I know I can do it with an advanced action on entering the slide, but it's a massive pain when you have up to a dozen elements that need resetting on every slide for a few slides in a row! Is there an EASY way to do this?

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
May 26, 2021 May 26, 2021

Copy link to clipboard

Copied

Depends on how you set up to start with... You can show/hide groups if you insist on using Show/hide.

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
May 26, 2021 May 26, 2021

Copy link to clipboard

Copied

LATEST

redwards@in2vate.com If you execute this JS on enter of each slide, it will reset:

 

var tempArray = [];

if (typeof visibleArray === 'undefined' || typeof visibleArray === null)
{
var visibleArray = [];
}

window.cpAPIEventEmitter.addEventListener("CPAPI_SLIDEENTER", function (e)
{
if (typeof visibleArray[e.Data.slideNumber - 1] === 'undefined')
{
for (var i = 0; i < e.Data.si.length; i++)
{
tempArray[i] = cp.model.data[e.Data.si[i].n + 'c'].visible;

if (tempArray[i] === true || tempArray[i] === false)
{
tempArray[i] = 0;
}
}

visibleArray[e.Data.slideNumber - 1] = tempArray;
tempArray = [];
}
else
{
for (var b = 0; b < visibleArray[e.Data.slideNumber - 1].length; b++)
{
if (visibleArray[e.Data.slideNumber - 1][b] === 0)
{
cp.hide(e.Data.si[b].n);
}
else
{
cp.show(e.Data.si[b].n);
}
}
}
});

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines