Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn More

View all

Sign in to view all badges

Any OOTB timeout component

Avatar

Avatar
Validate 1
Level 2
nchandra
Level 2

Likes

2 likes

Total Posts

14 posts

Correct Reply

2 solutions
Top badges earned
Validate 1
Boost 1
Affirm 1
View profile

Avatar
Validate 1
Level 2
nchandra
Level 2

Likes

2 likes

Total Posts

14 posts

Correct Reply

2 solutions
Top badges earned
Validate 1
Boost 1
Affirm 1
View profile
nchandra
Level 2

08-08-2018

I am wondering is there any OOTB timeout component for Adaptive forms (AEM 6.3 forms)?

our ask is if adaptive form is open with out any activity for 13 mins then we should open time out popup , after two mins we should redirect to home page.  Am looking if there is any OOTB component which  can be extended or reused ?

Thanks,

Chandra

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar
Springboard
Level 10
Mayank_Gandhi
Level 10

Likes

327 likes

Total Posts

1,150 posts

Correct Reply

185 solutions
Top badges earned
Springboard
Establish
Validate 1
Contributor 2
Ignite 5
View profile

Avatar
Springboard
Level 10
Mayank_Gandhi
Level 10

Likes

327 likes

Total Posts

1,150 posts

Correct Reply

185 solutions
Top badges earned
Springboard
Establish
Validate 1
Contributor 2
Ignite 5
View profile
Mayank_Gandhi
Level 10

08-08-2018

No OOTB component available for such use case, but should be easily achievable via JS.

One example can be handling events on form initialize and adding to the Timer based on the Events :

var timeoutID;

function setup() {

    this.addEventListener("mousemove", resetTimer, false);

    this.addEventListener("mousedown", resetTimer, false);

    this.addEventListener("keypress", resetTimer, false);

    this.addEventListener("DOMMouseScroll", resetTimer, false);

    this.addEventListener("touchmove", resetTimer, false);

    this.addEventListener("MSPointerMove", resetTimer, false);

    startTimer();

}

setup();

function startTimer() {

    // wait 10 seconds before calling goInactive

    timeoutID = window.setTimeout(goInactive, 10000);

}

function resetTimer(e) {

    window.clearTimeout(timeoutID);

    goActive();

}

function goInactive() {

    alert("you will be taken to home page");

//do something again

window.location.href = "http://localhost:4502/content/forms/af/test.html";

}

function goActive() {

       // do something

       

    startTimer();

}

Answers (1)

Answers (1)

Avatar

Avatar
Validate 25
Level 10
smacdonald2008
Level 10

Likes

1,409 likes

Total Posts

12,671 posts

Correct Reply

2,278 solutions
Top badges earned
Validate 25
Validate 10
Validate 1
Give back 900
Give back 600
View profile

Avatar
Validate 25
Level 10
smacdonald2008
Level 10

Likes

1,409 likes

Total Posts

12,671 posts

Correct Reply

2,278 solutions
Top badges earned
Validate 25
Validate 10
Validate 1
Give back 900
Give back 600
View profile
smacdonald2008
Level 10

08-08-2018

I do not believe there is for AEM forms. For this use case - you would need to build a custom component. For example, such a component could be implemented using JQUERY - jQuery setTimeout() Function Examples — SitePoint