Pin Code number password text box type and time limit for appear pin code block

I have a PINCode Block, and i want to be appeared that block every 10 seconds if user don't do anything, besides i want to have numberPassword type text box, is it possible in outsystems ?

Hi,

To be able to show something every 10 seconds you need to use js timers. If you aren't comfortable with js you can check this component.

About the numberPassword type text box I don't know if I understood correctly but using a textbox with a integer variable associated isn't enough?

Regards,

Marcelo

Marcelo Ferreira wrote:

Hi,

To be able to show something every 10 seconds you need to use js timers. If you aren't comfortable with js you can check this component.

About the numberPassword type text box I don't know if I understood correctly but using a textbox with a integer variable associated isn't enough?

Regards,

Marcelo

But we can have a pin which begins with 0, integer will ignore that 0

Hi,

You can keep it text and use this component to restrict chars.

Regards,

Marcelo

Hi Gurgen,

For appearing that PINCode Block every 10 seconds use Javascript:

take a local boolean variable visibility flag (true/false) to show/hide for the block.

function myTimer() {
    console.log(' each 10 second...');
    // Write your code here...
}
var myVar = setInterval(myTimer, 10000);

for cancel all your timer use: 

clearInterval(myVar);


For only number type Password text box use, screen onReady function load JavaScript:

var patternNotOk = eval("/[^0-9]/g");
document.getElementById($parameters.WidgetId).addEventListener("keypress", function(e){
    var text = this.value.replace(patternNotOk, '');
    if (this.value != text){
        this.value = text;
    }
});

document.getElementById($parameters.WidgetId).addEventListener("keyup", function(e){
    var text = this.value.replace(patternNotOk, '');
    if (this.value != text){
        this.value = text;
    }
});


Hope this helps,
Thanks