How You Can Remove Fields Dynamically
To remove a field from the form while its frame is running, set the field's parent to null. The technique used to set the parent depends on whether the field was created originally with a variable declared or was created without declaring its variable.