The forum of the forums
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Form autocomplete="off" functioning incorrectly

2 posters

Go down

In progress Form autocomplete="off" functioning incorrectly

Post by Shen Rajinto January 6th 2016, 3:11 pm

Technical Details


Forum version : #Invision
Position : Administrator
Concerned browser(s) : Mozilla Firefox
Screenshot of problem : https://img.photobucket.com/albums/v338/hrm2701/insun%20problem_zpsmpk3yycr.png
Who the problem concerns : Yourself
When the problem appeared : When editing a user's Special admin-only fields
Forum link : http://insun.forumotion.com

Description of problem

When you go to edit a user's profile in the admin section while using Mozilla Firefox and you have it set to remember your login information for your forum, your (the admin's) login information is overlaid on the user's Email and password fields in the Registration Information section. This causes an error when trying to change something else. The form has correct html for the attribute [autocomplete="off"]:

Code:
<form action="/admin/index.forum?part=users_groups&amp;sub=users&amp;mode=edit&amp;u=139&amp;extended_admin=1&amp;tid=c4847b65f3eaa2cab0d149d73b388d79" id="post" name="post" enctype="multipart/form-data" method="post" autocomplete="off">

However, Mozilla Developer Network says this about the autocomplete attribute:

Setting autocomplete="off" here has two effects:

it stops the browser saving field data for later autocompletion on similar forms though heuristics that vary by browser.
it stops the browser caching form data in session history. When form data is cached in session history, the information the user has filled in will be visible after the user has submitted the form and clicked on the Back button to go back to the original form page.

In some case, the browser will keep suggesting autocompletion values even if the autocomplete attribute is set to off. This unexpected behavior can be quite puzzling for developers. The trick to really force the no-completion is to assign a random string to the attribute like so :

autocomplete="nope"

Since this random value is not a valid one, the browser will give up.
Here is a direct link to the article: https://developer.mozilla.org/en-US/docs/Web/Security/Securing_your_site/Turning_off_form_autocompletion

I suggest changing the HTML attribute in that form to read [autocomplete="nope"] to eliminate this error.
avatar
Shen Rajinto
Forumember

Male Posts : 43
Reputation : 1
Language : English
Location : USA

http://insun.forumotion.com

Back to top Go down

In progress Re: Form autocomplete="off" functioning incorrectly

Post by Shadow January 6th 2016, 3:40 pm

Hello

Thanks for reading this tutorial: https://help.forumotion.com/t144387-remove-a-saved-username-password-from-your-browser

Best regards

Buttercup
Shadow
Shadow
Manager
Manager

Male Posts : 16217
Reputation : 1831
Language : French, English

Back to top Go down

In progress Re: Form autocomplete="off" functioning incorrectly

Post by Shen Rajinto January 6th 2016, 3:45 pm

Thank you. I understand that not saving my password for my forum will also fix the problem, but a simple change to the code (off to nope) would keep the current functionality and allow me to save my password as well. Is that something that can be raised to forumotion's admins for them to fix?
avatar
Shen Rajinto
Forumember

Male Posts : 43
Reputation : 1
Language : English
Location : USA

http://insun.forumotion.com

Back to top Go down

Back to top


 
Permissions in this forum:
You cannot reply to topics in this forum