Adding/removing fields in Solution Model

I’d like to enable the user to add/remove fields on a form but have a problem.
For example, the form has a field with a valuelist attached to it. When the user removes this field from the form, it disappears from solution model. When the user wants to get the field back to the form how do I know if any valuelist was attached to it (and other field properties as well)?

Thanks.

If you want that, you need to keep track of it yourself or revert the entire form using solutionModel.revertForm(formName);

I think it is a lot easier to set the field invisible instead:

forms.formName.elements.elementName.visible = false;