Title: Disabling browser auto-complete w/ php &amp; js
Last modified: August 20, 2016

---

# Disabling browser auto-complete w/ php & js

 *  [spaceheat](https://wordpress.org/support/users/spaceheat/)
 * (@spaceheat)
 * [14 years, 2 months ago](https://wordpress.org/support/topic/disabling-browser-auto-complete-w-php-js/)
 * Hello,
 * I am trying to follow the instructions spelled out in this thread,
    [http://wordpress.org/support/topic/disable-password-auto-complete?replies=8](http://wordpress.org/support/topic/disable-password-auto-complete?replies=8)
   and am running into problems with a syntax error.
 * To summarize, I added this to functions.php
 *     ```
       function kill_autocomplete() {
          wp_register_script('kill-ac',
              get_template_directory_uri() . '/js/autocompleteoff.js',
              array('jquery'),
              '1.0' );
          wp_enqueue_script('kill-ac');
       }
       add_action('wp_enqueue_scripts', 'kill_autocomplete');
       ```
   
 * and added a file named autocompleteoff.js to wp-includes/js/ that contained this
   line of code
    `jQuery('#user_pass').attr('autocomplete','off');`
 * After uploading these files I am getting a syntax error from the php, which is
   not surprising since I am basically cutting and pasting stuff in Simple Text.
   Here is the message…
 * > Fatal error: Call to undefined function add_action() in /home/content/s/p/a/
   > spaceheat/html/WordPress/wp-includes/functions.php on line 4559
 * Any idea what might be going wrong?
 * _[ Don’t bump, it’s [not permitted here](http://codex.wordpress.org/Forum_Welcome#No_Bumping).]_

The topic ‘Disabling browser auto-complete w/ php & js’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 0 replies
 * 1 participant
 * Last reply from: [spaceheat](https://wordpress.org/support/users/spaceheat/)
 * Last activity: [14 years, 2 months ago](https://wordpress.org/support/topic/disabling-browser-auto-complete-w-php-js/)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
