Dynamically Created List Bug

Dynamically Created List Bug

Here's a picture of a test form's checkbox field with one item:


In the form's code, I clear the checkbox and dynamically add items:
  1. clear ITEMS;
  2. for each r in LIST
  3. {
  4.     ITEMS:ui.add(r.ITEM);
  5. }
In live mode, it looks just fine. So I select an item and submit the form:


Back in edit mode, the item I selected is now appearing! Somehow, the form's definition code was changed.


This also happens for anonymous users submitting data with the form. I view this not only as a bug, but a security issue. For example, rather than a checkbox, what if it populated with account numbers or email addresses? Any form actions will leave residual data on the form's definition. Yikes!