Using form output to an API