How can I disable autocomplete in all textboxes in all pages?Normally I would do something like:
<Form name="formAction" action="…" method="POST" autocomplete="OFF">
However, for pages managed by Umbraco, I am unable to locate the page to add in this attribute to disable autocomplete.Thanks in Advance.
I am not really sure if I am running Umbraco in MVC or Forms mode. Any way to check?
I have created macros myself and added the macro to a page. When I save and publish the page, it will be accessible by the public. For eg a "Contact Us" page, I need to make the textboxes in the page to disable autocomplete.
What does the content of your macroes look like? Does it contain the forms code?
What version of Umbraco are you using? If you're using 7 it's MVC by default. Can't remember if it's also default MVC in Umbraco 6.1.6 though. But then it can be revealed by having a look in the /config/umbracoSettings.config
The reason I'm asking is that if you're using webforms you may have a <form runat="server"> tag sorrounding your content in your master template and that really sucks but then you might just need to try and add the autocomplete attribute on it to disable autocomplete.
I wish i could give you the code too.. as I would know where to put in the autocomplete="off" attribute.
I created the marco and the page using Umbraco Content Managment. All i need to to is just to click and add the necessary controls required. No coding is done.
The only code i can get is the HTML code:
----------------------
<p>Company Name<br />Address1 <br />Address2</p> <div title="This is rendered content from macro" class="umbMacroHolder" onresizestart="return false;" umbpageid="1691" umbversionid="df856322-4a76-4d0c-95ff-91b66a20d7f2" ismacro="true" umb_formguid="8809c5d4-f767-4276-bda3-844d8dd7f82d" umb_macroalias="umbracoContour.RenderForm"><!-- startUmbMacro --> <div class="contactus " id="contour"> <div class="contourField text name textfield mandatory"><!-- Our label --> Name <span class="contourIndicator">*</span> <div><!-- The data entry control --></div> <!-- Our Tooltip --> <!-- Validation --> </div> <div class="contourField text email textfield mandatory alternating"><!-- Our label --> Email <span class="contourIndicator">*</span> <div><!-- The data entry control --></div> <!-- Our Tooltip --> <!-- Validation --> </div> <div class="contourField text contactno textfield mandatory"><!-- Our label --> Contact No. <span class="contourIndicator">*</span> <div><!-- The data entry control --></div> <!-- Our Tooltip --> <!-- Validation --> </div> <div class="contourField text address textarea alternating"><!-- Our label -->Address <div><!-- The data entry control --></div> <!-- Our Tooltip --> <!-- Validation --> </div> <div class="contourField text message textarea mandatory"><!-- Our label --> Message <span class="contourIndicator">*</span> <div><!-- The data entry control --></div> <!-- Our Tooltip --> <!-- Validation --> </div> <div class="contourNavigation"></div> </div> <!-- endUmbMacro --></div>
You could try using the search function in Umbraco...it may return the corresponding page. But if I remember correctly it works best if you know a part of the page name it's referring too.
Disable autocomplete in textbox
How can I disable autocomplete in all textboxes in all pages?Normally I would do something like: <Form name="formAction" action="…" method="POST" autocomplete="OFF">
However, for pages managed by Umbraco, I am unable to locate the page to add in this attribute to disable autocomplete.Thanks in Advance.
Hi Wilson and welcome to our :)
Do you know if you're running Umbraco in MVC or Forms mode?
And have you created some forms yourself or how do you use forms?
/Jan
Hi Han, thanks for your reply.
I am not really sure if I am running Umbraco in MVC or Forms mode. Any way to check?
I have created macros myself and added the macro to a page. When I save and publish the page, it will be accessible by the public. For eg a "Contact Us" page, I need to make the textboxes in the page to disable autocomplete.
What does the content of your macroes look like? Does it contain the forms code?
What version of Umbraco are you using? If you're using 7 it's MVC by default. Can't remember if it's also default MVC in Umbraco 6.1.6 though. But then it can be revealed by having a look in the /config/umbracoSettings.config
The reason I'm asking is that if you're using webforms you may have a <form runat="server"> tag sorrounding your content in your master template and that really sucks but then you might just need to try and add the autocomplete attribute on it to disable autocomplete.
But why do you need to turn it off btw?
/Jan
My umbraco version is "umbraco v 4.11.8"
The content of my macro is just basic information like "Name, Email, Contact, Message".
There is a requirement by the management to turn it off.
Ok...then you're running webforms most likely.
But could you please post your code in here as it will be a lot easier to figure out your context and hence easier to help you solve your issue :)
Cheers,
Jan
I wish i could give you the code too.. as I would know where to put in the autocomplete="off" attribute.
I created the marco and the page using Umbraco Content Managment. All i need to to is just to click and add the necessary controls required. No coding is done.
The only code i can get is the HTML code:
----------------------
<p>Company Name<br />Address1 <br />Address2</p>
<div title="This is rendered content from macro" class="umbMacroHolder" onresizestart="return false;" umbpageid="1691" umbversionid="df856322-4a76-4d0c-95ff-91b66a20d7f2" ismacro="true" umb_formguid="8809c5d4-f767-4276-bda3-844d8dd7f82d" umb_macroalias="umbracoContour.RenderForm"><!-- startUmbMacro -->
<div class="contactus " id="contour">
<div class="contourField text name textfield mandatory"><!-- Our label --> Name <span class="contourIndicator">*</span>
<div><!-- The data entry control --></div>
<!-- Our Tooltip --> <!-- Validation --> </div>
<div class="contourField text email textfield mandatory alternating"><!-- Our label --> Email <span class="contourIndicator">*</span>
<div><!-- The data entry control --></div>
<!-- Our Tooltip --> <!-- Validation --> </div>
<div class="contourField text contactno textfield mandatory"><!-- Our label --> Contact No. <span class="contourIndicator">*</span>
<div><!-- The data entry control --></div>
<!-- Our Tooltip --> <!-- Validation --> </div>
<div class="contourField text address textarea alternating"><!-- Our label -->Address
<div><!-- The data entry control --></div>
<!-- Our Tooltip --> <!-- Validation --> </div>
<div class="contourField text message textarea mandatory"><!-- Our label --> Message <span class="contourIndicator">*</span>
<div><!-- The data entry control --></div>
<!-- Our Tooltip --> <!-- Validation --> </div>
<div class="contourNavigation"></div>
</div>
<!-- endUmbMacro --></div>
------------------------------
Hi Wilson
Aah ok, so you're not a developer who can actually access the code created like html, css, javascript c# etc.?
Then I guess you need to contact one of the developers in order to turn it off.
/Jan
I am able to access the codes.
I can see the link in the Masterpage
<a href=''/{localLink:1691''>Contact Us</a>
Do you know where I can find the file location for this pageID 1691?
Hi Wilson
You could try using the search function in Umbraco...it may return the corresponding page. But if I remember correctly it works best if you know a part of the page name it's referring too.
Hope this helps.
/Jan
The issue has been resolved by adding a javascript in the masterpage to check for text input control and turn off autocomplete.
<script language="javascript" type="text/javascript">
$(document).ready(function ()
{
try{
$("input[type='text']").each(function()
{ $(this).attr("autocomplete","off");});}catch(e){}});
</script>
Thanks Jan for your help anyways.
is working on a reply...