I want to make a button that is activated only when the input values ​​are the same.

Hello. I am always grateful for your sincere replies.

>> My Velo Skill: Beginner

>> What am I going to do?

  1. We are going to use the content manager to allow any site visitor to write comments without logging in. [ Write item : Comment / Password, just two item :slight_smile: ]
  2. Anyone who has visited the site can delete comments without logging in. However, this is only possible if the password entered when writing a comment matches. ** Even if you are not a commenter, other people can delete comments by entering the correct password you entered when writing comments. Comments can be deleted if someone is lucky enough to guess your password.

>> What’s the problem?

  1. I have succeeded in allowing anyone to leave comments without logging in by content manager.
  2. But I don’t know how to enable the delete button only when the passwords match.

Any Velo code tips for this?
I need your help.

Thank you.

Make the Delete button disable on load, and add code like:

$w.onReady(() => {
$w('#passwordInput1, #passwordInput2').onInput(() => {
$w('#passwordInput1').value === $w('#passwordInput2').value ? $w('#deleteBtn').enable() : $w('#deleteBtn').disable();
})
})