The Download behavior should be in the head.
Currently, you have a form around the repeat region, that should be deleted, than add a form around the download button and hidden form element.
in the download behavior, set the down,load file to use the hidden form element.