Workflow and ServiceDesk Community

 View Only

Workflow - Web Form - Timer 

Jun 10, 2015 02:46 PM

In this article I will show you how to create a Timer or Countdown in the Forms (Web).png Forms (Web) Project Type

 

Add a Form Builder component to the Workflow.

Add a Textbox to the Form.

Change the Control ID: “counter”.

Textbox - Functionality (Timer).png

Now edit the Web Form.

Go to the Behaviour tab.

Add timer() to the onload event for the Body.

Form - Behaviour (Timer).png

var count = 30;
var x;
function timer() {
    x = setTimeout("timer()",1000);
    count = count-1;
    document.getElementById("counter").value = count;
}

Change count to the value you wish to count down from.

 

This could be done with a Label instead of a textbox.

Add a Label to the Form.

Change the Control ID: “counter2”.

document.getElementById("counter2").innerHTML = count;

You could then use an Auto Exit Page On Timer to close the form or go to the next page or whichever route you need to go.


Protirus.png

Statistics
0 Favorited
1 Views
0 Files
0 Shares
0 Downloads

Tags and Keywords

Related Entries and Links

No Related Resource entered.