Input field

is it possible to put an icon next to an input field which is set as a password field that allows the user to toggle between “showing” the input and hiding it with dots

Bob, it’s definitely possible. Use the show and hide commands. something like this:

export function image1_click(event) {
if ($w(‘#txtDots’).hidden){
$w(‘#inputPassword’).hide();
$w(‘#txtDots’).show();
} else {
$w(‘#inputPassword’).show();
$w(‘#txtDots’).hide();
}
}

Also, I wasn’t sure from your post if you were interested in changing the image of the toggle icon depending on the show/hide state. If so, look here for information on how to do that.

thanks i will try that

just a question
if the field is set to type password then the DOTS are there by default
how do you reference those dots … they are not there as #txtDots as your snippet uses

Initially, I wasn’t sure if I was thoroughly understanding what you were trying to do; now, more so. The example above was merely meant to demonstrate a show/hide toggle.

To have three dots in the input initially, click “Input Type” for the input element and configure it this way.

This screen shot should have been in the previous post: