Bookmarkelet to automatically fill in forms

UPDATED: Bookmarkelet now fills out password fields and radio buttons.

This bookmarkelet will find all the form fields on a page and fill them with the word “test”. It will also check all checkboxes on the page. This is a great time saver for when you need to work on a form, allowing you to actually do work instead of wasting time typing random text in.

To use, just drag this link:

Fill Form Fields

into your bookmarks or links bar, or copy the JavaScript below and add a new bookmark, then paste the JavaScript as the link for the bookmark.

When you want to fill out a form automatically, just click the link and it will fill out all the forms on the page you’re currently viewing.

Here’s the JavaScript source for those who want it:

javascript:var a=document.getElementsByTagName('input');for(var i=0;i<a.length;i++){if(a[i].type=='text'||a[i].type=='password'){a[i].value="test"}else if(a[i].type=='checkbox'||a[i].type=='radio'){a[i].checked=true}};a = document.getElementsByTagName('textarea');for(var i=0;i<a.length;i++)a[i].value='test';void(0);

15:17 Fri 2008-06-06 (Index)

Say something!