Malte
This would solve your problem:
ad_form -extend -name freelancer -form { {file_ids.${folder}:text(checkbox),multiple,optional [list label "[_ mypack.Folder] $folder_name"] [list options $files]}}
and be alot simpler than rewriting ad_form.
Using curly braces delays the evaluation you are actually passing the value of the options variable to ad_form instead of the name.