Reveal/mask password on press and hold & release

scott Ogilvie shared this question 1 year ago
Answered

I have created a password input and used dynamic panels to allow the user to toggle between the masked and revealed versions. One panel has the input password field and one has a text field. They are both populated by and populate a variable. There is a show/hide icon that switches panels. This works great - on tap.


But what I want to do is use a press and hold event - this works to reveal the password but I want on release for the masked version to be shown again. There is no 'on release press and hold' event and therefore no way to get from the revealed version back to the masked version. Is there any other way to do this?

Comments (4)

photo
1

Dear Scott.


Do you have an example .vp file of what you're describing so we can take a look? You can attach it in a .rar format, or upload it to a file sharing service such as Dropbox, and attach the link to it here.


Best,


Sonia Durán

photo
1

Sure Sonia, here it is. As you will see, the press and hold functionality works as desired. The issue is getting the input and 'show/hide' button back to the original state when the 'press and hold' event is no longer in operation.


Thanks


Scott

photo
1

The last set value is avoiding to show the "show icon". To avoid that, you should create one dynamic panel with both states in two different screens. Then you should add the events to accomplish each of the states.


Best,

photo
1

Thanks Sonia, I have tried the show/hide images in a dynamic panel as 2 screens but I have the same problem. On tap and hold, the 'hide button' and input changes but I have no way of getting them back to the original states.


I have included the revised version: