Skip to content

Instantly share code, notes, and snippets.

@yellowsnow
Last active August 29, 2015 14:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save yellowsnow/fce90533550238775993 to your computer and use it in GitHub Desktop.
Save yellowsnow/fce90533550238775993 to your computer and use it in GitHub Desktop.
Fill form with input names (requires jquery in website)

Installation

Add a bookmark to your browser with the :

  • Name : Fill form
  • URL : below javascript URL
javascript:(function(){$('select:not(:disabled)').each(function(){var%20v%20=%20$(this).find('option:last').attr('selected','selected').text();/*var%20n%20=%20$(this).siblings('input.actxtbox');n.val(v);*/$(this).change();});$('textarea:not(:disabled),input[type=text]:not(:disabled)').each(function(){$(this).val($(this).attr('name').replace(/([A-Z])/g,%20'%20$1').replace('[','%20').replace(']','%20').replace('.','%20').replace(/^./,%20function(str){%20return%20str.toUpperCase();})%20||%20$(this).attr('id')%20||%20'value');});})()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment