INTRO
I am a developer and one of my main issue is fill all form fields of a form module. What a boring task!
REQUIREMENTS
jQuery.
INSTALL
Create a new bookmarklet into your browser bookmark toolbar.
Unwrap all the JavaScript code in a text editor (ie Notepad++).
Paste all the JavaScript code.
Use the bookmarklet into your page.
SCRIPT / SOURCE CODE
javascript:Filler();
function Filler() {
function getRandomString(len) {
/* Script by http://www.mediacollege.com/internet/javascript/number/random.html */
var chars = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXTZabcdefghiklmnopqrstuvwxyz";
var randomstring = '';
for (var i=0; i<len; i++) {
var rnum = Math.floor(Math.random() * chars.length);
randomstring += chars.substring(rnum,rnum+1);
}
return randomstring;
}
$('form').each(function(i) {
$('input[type=text]').each( function(i) {
$(this).val( getRandomString(8) );
} );
$('input[type=checkbox]').each( function(i) {
$(this).attr('checked', 'true');
} );
});
}
CREDITS
David Lomuscio, August 2011