Home » Liferay Portal » English » 3. Development

Combination View Flat View Tree View
Threads [ Previous | Next ]
Ashish Renapurkar
autocomplete enabled on create user page
February 7, 2013 4:54 AM

Ashish Renapurkar

Rank: New Member

Posts: 23

Join Date: January 18, 2012

Recent Posts

Hello All,

I'm trying to custom hook for liferay login .

In which I want autocomplete enabled on create user page. Means while we are trying to login the value of that box is not coming automatically.

It may come from cookies or any ways. I have to stop it. I have tried below logic. But it is also not workout. Currently I'm working on liferay 6.0.6.

window.onload = function() {
for(var i = 0, l = document.getElementsByTagName('login').length; i < l; i++) {
if(document.getElementsByTagName('login').item(i).type == 'text') {
document.getElementsByTagName('login').item(i).setAttribute('autocomplete', 'off');

In advance ,


Ashish Renapurkar
David H Nebinger
RE: autocomplete enabled on create user page
February 7, 2013 5:27 AM

David H Nebinger

Community Moderator

Rank: Liferay Legend

Posts: 13216

Join Date: September 1, 2006

Recent Posts

It won't work because you're trying to use DOM directly, whereas the fields themselves are namespaced. Do a view source on the page in question to see what the field names actually are...

Since they're control panel entries, they are not instantiable and the field names will remain the same across page view (good news for you).

Participate in the State of Liferay Community 2017. Help the community and even win some prizes!