{"id":1637,"date":"2018-06-19T21:40:41","date_gmt":"2018-06-19T15:40:41","guid":{"rendered":"http:\/\/promincproductions.com\/blog\/?p=1637"},"modified":"2018-06-19T21:40:41","modified_gmt":"2018-06-19T15:40:41","slug":"html-form-autocomplete-analyzer-bookmarklet","status":"publish","type":"post","link":"https:\/\/promincproductions.com\/blog\/html-form-autocomplete-analyzer-bookmarklet\/","title":{"rendered":"HTML Form Autocomplete Analyzer Bookmarklet"},"content":{"rendered":"<p>This handy web browser bookmarklet will show you what autocomplete and autocorrect settings are set on a forms input fields.<\/p>\n<p>&nbsp;<\/p>\n<p><a style=\"font-size: 16px;font-weight: bold\" href=\"https:\/\/promincproductions.com\/blog\/wp-content\/uploads\/2018\/06\/Autocomplete-Form-Details-1.png\" rel=\"attachment wp-att-639\" data-lasso-id=\"647\" data-rel=\"lightbox-gallery-WsN1a0Qv\" data-rl_title=\"\" data-rl_caption=\"\" title=\"\"><img decoding=\"async\" class=\"size-medium wp-image-1639\" src=\"https:\/\/promincproductions.com\/blog\/wp-content\/uploads\/2018\/06\/Autocomplete-Form-Details-1-500x116.png\" alt=\"Autocomplete attribute analysis for HTML forms\" width=\"500\" height=\"116\" srcset=\"https:\/\/promincproductions.com\/blog\/wp-content\/uploads\/2018\/06\/Autocomplete-Form-Details-1-500x116.png 500w, https:\/\/promincproductions.com\/blog\/wp-content\/uploads\/2018\/06\/Autocomplete-Form-Details-1-768x177.png 768w, https:\/\/promincproductions.com\/blog\/wp-content\/uploads\/2018\/06\/Autocomplete-Form-Details-1-1024x237.png 1024w, https:\/\/promincproductions.com\/blog\/wp-content\/uploads\/2018\/06\/Autocomplete-Form-Details-1-150x35.png 150w, https:\/\/promincproductions.com\/blog\/wp-content\/uploads\/2018\/06\/Autocomplete-Form-Details-1-600x139.png 600w, https:\/\/promincproductions.com\/blog\/wp-content\/uploads\/2018\/06\/Autocomplete-Form-Details-1.png 1917w\" sizes=\"(max-width: 500px) 100vw, 500px\" \/><\/a><\/p>\n<p>Quickly analyze an HTML form to see what autocomplete and autocorrect attributes have been set for each input.<\/p>\n<h2>Autocomplete Analyzer Bookmarklet Code<\/h2>\n<p>&nbsp;<\/p>\n<pre class=\"lang:js decode:true\">javascript:(function()%7B if(typeof jQuery=='undefined') { var headTag = document.getElementsByTagName(\"head\")[0]; var jqTag = document.createElement('script'); jqTag.type = 'text\/javascript'; jqTag.src = 'https:\/\/ajax.googleapis.com\/ajax\/libs\/jquery\/1.12.4\/jquery.min.js'; jqTag.onload = analyzePage(); headTag.appendChild(jqTag); } else { analyzePage(); }  function analyzePage() { var formIds = \"\"; jQuery( 'form' ).each( function(){ formIds += \"\\nID: \" + this.id + \" (name: \" + this.name + \")\"; }); var formId = prompt('Enter Form ID to Analyze.\\n\\nForms found on this page:' + formIds, ''); var tableData = []; function Field( field ) { this.type = ( typeof jQuery( field ).attr('type') == 'undefined' ? jQuery( field ).prop('tagName').toLowerCase() : jQuery( field ).attr('type') ); this.name = jQuery( field ).attr( 'name' ); this.id = jQuery( field ).attr( 'id' ); this.autocomplete = jQuery( field ).attr( 'autocomplete' ); this.autoccorrect = jQuery( field ).attr( 'autoccorrect' ); } jQuery('#' + formId + ' input, #' + formId + ' select, #' + formId + ' textarea').each(function(){ tableData.push( new Field( this ) ); }); console.table( tableData ); alert( 'Form autocomplete information has been displayed in the Dev Tools Console tab.'); } %7D)();<\/pre>\n<p>&nbsp;<\/p>\n<h2>How to Install the Autocomplete Analyzer Bookmarklet<\/h2>\n<ol>\n<li>Copy the above code.<\/li>\n<li>Create a new bookmark by right-clicking on the bookmark bar and choosing\u00a0<strong>Add Page<\/strong><\/li>\n<li>In the\u00a0<strong>Name <\/strong>field, enter\u00a0<strong>Autocomplete Analyzer<\/strong><\/li>\n<li>In the\u00a0<strong>URL<\/strong> field, paste the code (Ctrl + V)<\/li>\n<li>Click the\u00a0<strong>Save<\/strong> button<\/li>\n<\/ol>\n<p>&nbsp;<\/p>\n<h2>How to Use the Autocomplete Analyzer Bookmarklet<\/h2>\n<ol>\n<li>On any webpage with an HTML form, click your bookmarklet in the Bookmark bar.<\/li>\n<li>A prompt asks you to enter the ID of the HTML form you wish to analyze.\u00a0 A list of the forms found on the page will be listed.\u00a0 Click the OK button.\n<ul>\n<li>\n<figure id=\"attachment_1640\" aria-describedby=\"caption-attachment-1640\" style=\"width: 487px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/promincproductions.com\/blog\/wp-content\/uploads\/2018\/06\/Autocomplete-Form-Prompt.png\" rel=\"attachment wp-att-640\" data-lasso-id=\"648\" data-rel=\"lightbox-gallery-WsN1a0Qv\" data-rl_title=\"\" data-rl_caption=\"\" title=\"\"><img decoding=\"async\" class=\"size-full wp-image-1640\" src=\"https:\/\/promincproductions.com\/blog\/wp-content\/uploads\/2018\/06\/Autocomplete-Form-Prompt.png\" alt=\"\" width=\"487\" height=\"255\" srcset=\"https:\/\/promincproductions.com\/blog\/wp-content\/uploads\/2018\/06\/Autocomplete-Form-Prompt.png 487w, https:\/\/promincproductions.com\/blog\/wp-content\/uploads\/2018\/06\/Autocomplete-Form-Prompt-150x79.png 150w\" sizes=\"(max-width: 487px) 100vw, 487px\" \/><\/a><figcaption id=\"caption-attachment-1640\" class=\"wp-caption-text\">Enter an HTML ID you wish to analyze.<\/figcaption><\/figure>\n<\/li>\n<li>NOTE: This looks for input fields within an ID on the page &#8211; it technically doesn&#8217;t need to be a &lt;form&gt; element &#8211; it can be any element on the page.<\/li>\n<\/ul>\n<\/li>\n<li>Pres\u00a0<strong>F12<\/strong> on your keyboard (or right click on the page and choose\u00a0<strong>Inspect Element<\/strong>).\u00a0 This will open the Developer Tools panel.<\/li>\n<li>Select the\u00a0<strong>Console<\/strong> tab in the developer tools panel.\n<ul>\n<li>A table will be displayed with the forms Autocomplete and Autocorrect settings.<\/li>\n<\/ul>\n<\/li>\n<\/ol>\n<p>&nbsp;<\/p>","protected":false},"excerpt":{"rendered":"<p>This handy web browser bookmarklet will show you what autocomplete and autocorrect settings are set on a forms [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":1639,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"wprm-recipe-roundup-name":"","wprm-recipe-roundup-description":"","_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_post_was_ever_published":false},"categories":[12,5],"tags":[],"class_list":["post-1637","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-javascript-jquery","category-website-development"],"jetpack_featured_media_url":"https:\/\/promincproductions.com\/blog\/wp-content\/uploads\/2018\/06\/Autocomplete-Form-Details-1.png","jetpack_shortlink":"https:\/\/wp.me\/p4BbcR-qp","jetpack_sharing_enabled":true,"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/promincproductions.com\/blog\/wp-json\/wp\/v2\/posts\/1637","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/promincproductions.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/promincproductions.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/promincproductions.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/promincproductions.com\/blog\/wp-json\/wp\/v2\/comments?post=1637"}],"version-history":[{"count":2,"href":"https:\/\/promincproductions.com\/blog\/wp-json\/wp\/v2\/posts\/1637\/revisions"}],"predecessor-version":[{"id":1642,"href":"https:\/\/promincproductions.com\/blog\/wp-json\/wp\/v2\/posts\/1637\/revisions\/1642"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/promincproductions.com\/blog\/wp-json\/wp\/v2\/media\/1639"}],"wp:attachment":[{"href":"https:\/\/promincproductions.com\/blog\/wp-json\/wp\/v2\/media?parent=1637"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/promincproductions.com\/blog\/wp-json\/wp\/v2\/categories?post=1637"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/promincproductions.com\/blog\/wp-json\/wp\/v2\/tags?post=1637"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}