Skip to content

Instantly share code, notes, and snippets.

@achasveachas
Created September 10, 2020 18:21
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 achasveachas/eb25a97d7d88cd8b883a4763aaeae508 to your computer and use it in GitHub Desktop.
Save achasveachas/eb25a97d7d88cd8b883a4763aaeae508 to your computer and use it in GitHub Desktop.
require 'net/http'
names = {
"Child 1 Name" => "Child 1 Class",
"Child 2 Name" => "Child 2 Class",
"Wife's Name" => "Staff"
}
form_url = URI("https://docs.google.com/forms/d/e/555/formResponse")
names.each do |name, age|
form_data = {
"entry.338135299" => age,
"entry.1634501314" => name,
"entry.1876184383" => "Parent Name",
"entry.464151171" => "No",
"entry.1301996500" => "None of the Above",
"entry.46633140" => "None of the Above",
"entry.693698665" => "Yes",
"entry.227426312" => "No",
"entry.1433839005" => "No"
}
puts "Submitting form for #{name} in #{age}"
res = Net::HTTP.post_form form_url, form_data
puts "Status #{res.message}"
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment