Bug or feature? Adding a field twice adds a list.
Brought to you by:
ebrehault
If you put e.g. a RichText field in a layout twice, the value of the item is a list of the two inputs.
While this may be used in some way, I think it's an unintended side effect.
It also causes duplicate id= attributes, which is invalid HTML (if kupu is in use, it causes many more.)
maybe a good way to handle is to avoid multiple field substituion when rendering the form in edit mode
If possible, I think the form should show an error when you try to save with the same field included more than once.
Otherwise you will be faced with an incompletely rendered layout, and you'll have to puzzle about why.
It's probably enough to show the duplicate fields, unrendered, in red, maybe with mouseover (or other) text with the reason.