parse form into struct