Skip to Content Skip to Menu

🎃 Happy Halloween! Treat yourself with an awesome discount on memberships! Get 20% off now with code SPOOKY-2024!

[SOLVED] CB: Disallow registration field to show past value

  • dotcom22
  • dotcom22
  • OFFLINE
  • Posts: 522
  • Thanks: 14
  • Karma: 4
11 years 5 months ago #226699 by dotcom22
in my case I would like disable autocomplete because some of my Pro users need to register Standard users in their own name many time per day. The fact to have autocomplete enabled is annoying because if they don't take care, they can make a mistake and insert a wrong value (for example the same phone number of an existent user), reason why I would prefer do not have any autocomplete feature enabled. Is also annoying to tell to my user to disable this on their browser (they will hesitate to mess up in their browser settings) and because this depend what kind of browser is used.

I wondering if is possible with auto-action to set autocomplete=off in all text fields of registration form... Even if this can't work in all situation, it will limit a bit..

I use Joomla 3.3.6 - CB 2.0.4 - CBSubs 4 - Several Incubator plugins

Please Log in or Create an account to join the conversation.

  • krileon
  • krileon
  • ONLINE
  • Posts: 48460
  • Thanks: 8280
  • Karma: 1443
11 years 5 months ago - 11 years 5 months ago #226755 by krileon
You can try using CB Auto Actions on the registration display trigger to add jQuery to the header using a Code action that adds the autocomplete attribute to every input. Example jQuery as follows. Please understand this is a "suggestion" attribute. A browser does not have to respect it. Also formfill browser extensions tend to completely ignore it. Browsers that don't support HTML5 will not validate your sites HTML and may completely ignore the attribute.
Code:
$( '.cbRegistration' ).find( 'input' ).attr( 'autocomplete', 'off' );

I also suggest using an HTML5 Joomla template. If it's not HTML5 then edit your Joomla template index file and change its doctype (should be at the very top) to the following. This will already be the case if you're on Joomla 3.x (probably Joomla 2.x too).
Code:
<!DOCTYPE html>


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.
Last edit: 11 years 5 months ago by krileon.

Please Log in or Create an account to join the conversation.

  • dotcom22
  • dotcom22
  • OFFLINE
  • Posts: 522
  • Thanks: 14
  • Karma: 4
11 years 5 months ago #226761 by dotcom22
Excellent !! :woohoo: :silly:

Your trick work well when using FF20... I suppose this will not work with IE8 (not tested yet because I'm under Ubuntu) but should work with IE9. Chrome and Safari should work...

Anyway if I can limit this annoying issue for my case is great...

many thank

I use Joomla 3.3.6 - CB 2.0.4 - CBSubs 4 - Several Incubator plugins
The following user(s) said Thank You: krileon

Please Log in or Create an account to join the conversation.

Moderators: beatnantkrileon
Powered by Kunena Forum