Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Easily fill out web forms using data from a spreadsheet using this bookmarklet.

Other gists & tricks:

To set this up, paste the code below into the "location" of a bookmark. Make sure it starts with "javascript:", some browsers strip this out when you paste.

  1. Find the "name" of each form element you want to put data into. You can find the "name" by right clicking on the form box and "inspecting" it.
  2. By using a spreadsheet, create a set of urls with the data you want to input. Example: variablename1 is the "name" of the form field. "value1" is the value you want to put into the Navigate to that custom URL4. Click the bookmarklet. Voila!
javascript: function getUrlVars() {
var vars = [],
var hashes = window.location.href.slice(window.location.href.indexOf('?') + 1).split('&');
for (var i = 0; i < hashes.length; i++) {
hash = hashes[i].split('=');
vars[hash[0]] = hash[1];
return vars;
function ParamsIntoForms(get) {
for (var i = 0; i < get.length; i++) {
if (document.getElementsByName(get[i]).length != 0) {
document.getElementsByName(get[i])[0].value = decodeURIComponent(get[get[i]]);
return false;
var get = getUrlVars();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.