Support

  1. Queenielass
  2. Support
  3. Thursday, April 26 2018, 08:15 PM
  4.  Subscribe via email
Can you advise me as to the best way to turn off {browser} autocomplete details on the Registration form, please?
I have tried to adapt the mod_login as an override by adding autocomplete="off" eg

<input id="modlgn-username" autocomplete="off" type="text" name="username" class="input-small" tabindex="0" size="18" placeholder="<?php echo JText::_('MOD_LOGIN_VALUE_USERNAME'); ?>" />


but I am not sure if that is correct and I have no idea where the best place is to do this for the registration form.
References
  1. https://getmentorednow.com
admin Accepted Answer
Admin
Hi,
you should use autocomplete="off" in all fields (required by Chrome and Webkit based browsers) and in the form (required by Firefox and Gecko based browsers) html tags. The fastest*** way to make this is to add the autocomplete attribute via Javascript with a code like this:
jQuery(document).ready(function(){
jQuery('#member-registration, #member-registration input').attr('autocomplete','off');
});


*** there are many ways to make this and normally is recommended a template override (like your login module), but Registration form is dynamic and this is not possible with a simple way, so I suggested you the javascript solution.
  1. more than a month ago
  2. Support
  3. # 1
Queenielass Accepted Answer
Pro
Thanks for this.
I created a custom js file in my_Template > Custom> JS > autocomplete-off.js - is this the correct way to do it?
Also, I read that Chrome no longer supports autocomplete="off" and it's recommended to change instead to 'autocomplete="new-password"'

jQuery(document).ready(function(){
jQuery('#member-registration, #member-registration input').attr('autocomplete="new-password"');
});


This hasn't worked as yet - I have scripted this correctly?

Thanks
  1. more than a month ago
  2. Support
  3. # 2
admin Accepted Answer
Admin
Hi,
I created a custom js file in my_Template > Custom> JS > autocomplete-off.js - is this the correct way to do it?
It seems ok, because it is loaded in your site.

Also, I read that Chrome no longer supports autocomplete="off" and it's recommended to change instead to 'autocomplete="new-password"'
I'm sorry but I does not know this :o
Anyway my code add also autocomplete="off" in form declaration and it should be necessary to work with firefox like browsers.

This hasn't worked as yet - I have scripted this correctly?
You code is not correct. This code:
attr('autocomplete="new-password"');
should be
attr('autocomplete','new-password');
.
The correct should be something like:
jQuery(document).ready(function(){
jQuery('#member-registration').attr('autocomplete','off'); // Firefox browser, autocomplete in form declaration
jQuery('#member-registration input').attr('autocomplete','new-password'); // Other browsers, autocomplete in the fields
});
  1. more than a month ago
  2. Support
  3. # 3
zenpig Accepted Answer
Pro
If anyone else runs into this what works for me is

jQuery(document).ready(function(){
jQuery('#jform_password1').attr('autocomplete','new-password');
jQuery('#jform_password1 input').attr('autocomplete','new-password');
});


Got tired of the field value populating on editing profiles. No browser needs to follow the "new-password" but most do now in recognizing the issue. Almost if not all browsers ignore "off". Other way to do similar, functionally, is to edit (create override, of course) layouts/joomla/form/field/password.php
  1. 2 weeks ago
  2. Support
  3. # 4
  • Page :
  • 1


There are no replies made for this post yet.
However, you are not allowed to reply to this post.

Request Support

Support is currently Offline

Support Availability

Working days: Monday to Friday. The support staff is not available on weekends; in the most of cases tickets will not be answered during that time.

Reply time: Depending on the complexity of your support issue it's usually between a few minutes and 24 hours for paid members and about one week for free members. When we expect longer delays we will notify you.

Guidelines

Before you post: read the documentation and search the forums for an answer to your question.

When you post: include Site Details if you request a support (you can use the form below the reply in Site Details tab).

Auto Solved Question: If after a week the author of the post does not reply to a request by moderator, the question will be marked as resolved.

Language: only English

Search Users

Easy ProfileĀ® is not affiliated with or endorsed by Open Source Matters or the Joomla Project. Joomla is Free Software released under the GNU/GPL License.