Forum OpenACS Q&A: Response to "template:multirow create" for customizable fields

I am not sure if that is applicable to your problem, but maybe you could structure it this way: create one row in the multirow for each field_name/value pair plus a number that identifies the row that this pair actually belongs to, then you can use the <group> tag in the adp file to group the actual rows together, without knowing the field names before.

So the tcl file would contain something like this:

template::multirow create user_custom custom_row field_name value

set row_counter 0
loop_through_rows {
  loop_through_fields_of_one_row {
    template::multirow append user_custom $row_counter $field_name $value
  }
  incr row_counter
}

and the .adp file that:
<multiple name=user_custom>
<group column=custom_row>
@user_custom.field_name@: @user_custom.value@
</group>
<hr>
</multiple>
This will be ugly because each row will be separated by a hr tag only, but it could be easily formatted in a table too.