Skip to Content
NFSFU234FormValidation v3 is here — file upload validation, config-driven rules, and more.
v2 (legacy)togglePasswordVisibilityAll

togglePasswordVisibilityAll

The togglePasswordVisibilityAll function toggles the visibility of all password inputs within a specified form and updates the corresponding visibility icons.

Works in: HTML5, React JS

ParameterTypeDefaultDescription
iconsobject{}Object containing icons for showing and hiding the password.
uformstring | HTMLFormElement | HTMLDivElement | nullnullThe form element or its ID.
toggleAllbooleanfalseFlag indicating whether to toggle all password inputs.

Usage

Example: Toggle Visibility of All Password Inputs

const icons = { show: '🙈', hide: '👀' }; const form = document.getElementById('myForm'); nfsfu234FormValidation.togglePasswordVisibilityAll(icons, form, true);

See also

Last updated on