Focus is not a dynamic attribute for inputs?

Hey Wapplees,

I would like to focus an input when a variable has a certain value.
I thought I could do this with a dynamic attribute, but it seems that inputs do not have focus as a dynamic attribute…

My next thought to work around this would be to dynamically select and focus the inputs when the update event happens on the variable, for example:
var registrationStep = 1;
<input type=‘text’ id=‘input1’>
<input type=‘text’ id=‘input2’>
registrationStep.onChange = function(registrationStep) {
$(’#input+“registrationStep” ').focus();
}

I would like to be able to do this within wappler, is there a way?

or maybe I am approaching it from the wrong direction and there is another way to do this?

Community Page
Last updated: