Created
September 10, 2020 18:21
-
-
Save achasveachas/eb25a97d7d88cd8b883a4763aaeae508 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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