I figured this out by looking at it backwards. I googled how to make the
form submit automatically on page load and found out that
$(document).submit() makes a form submit on page load, so I took out
$("#multiform").submit(); and now it works. An added note to anyone else
who might find this and be working on something similar. For some reason,
having an id of submit for input type submit causes the name and age
variables to be ignored.