togglePasswordVisibilityAll
Toggles every password field in a form (or just one, unless
toggleAll is set) between masked and visible.
Returns: void
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
icons | object | required | - | The shared show/hide icon elements (or CSS ids) used across all toggled fields. |
uform | `null \ | string \ | HTMLFormElement \ | HTMLDivElement` |
toggleAll | boolean | optional | false | When true, toggles every password field in the form at once. Defaults to false. |
Usage
Example: Toggle Visibility of All Password Inputs
const icons = { show: '🙈', hide: '👀' };
const form = document.getElementById('myForm');
nfsfu234FormValidation.togglePasswordVisibilityAll(icons, form, true);Last updated on