PHP code example of nowo-tech / password-toggle-bundle

1. Go to this page and download the library: Download nowo-tech/password-toggle-bundle library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

nowo-tech / password-toggle-bundle example snippets




return [
  // ...
  Nowo\PasswordToggleBundle\NowoPasswordToggleBundle::class => ['all' => true],
];

use Nowo\PasswordToggleBundle\Form\Type\PasswordType;

$builder->add('password', PasswordType::class);

$builder->add('password', PasswordType::class, [
  'toggle' => true,
  'visible_icon' => 'tabler:eye-off',
  'hidden_icon' => 'tabler:eye',
  'visible_label' => 'Show',
  'hidden_label' => 'Hide',
  'button_classes' => ['input-group-text', 'cursor-pointer'],
  'toggle_container_classes' => ['form-password-toggle'],
]);

$builder->add('password', PasswordType::class, [
  'toggle' => false, // Renders a simple password input without toggle button
]);