Checking for inactivity in K2 Smartform

This article covers the steps to get a timer going that checks for inactivity.

Inactivity is consider as no movement in the mouse or keyboard.


So here we have create a View and add a Data Label in it.

Step 1, adding a Data Label
Step 1, adding a Data Label

 

Next go to the rules designer and add a View Initialize Rule.

2. Adding a View Init Rule
Step 2. Adding a View Initialize Rule

Now configure this rule and do a “Transfer Data” action.

3. Adding Transfer Data Action
Step 3. Adding a Transfer Data Action

The javascript that does all the magic is found here, http://stackoverflow.com/questions/9564602/how-to-know-browser-idle-time

But for our case, we need to modify it a little, so to use my version download the script from the following link, http://pastebin.com/embed_js.php?i=FDkg3EML

4. Adding the script
Step 4. Copy the script into the rule

 

Finally, Save & Checkin and Test.

Step 5. Testing!
Step 5. Testing!

Leave a Reply

Your email address will not be published.