Vulnerability in EPiServer.Forms
I'm implementing a custom file summary for an image library where I need to remove all the standard fields except description. I've been able to do this using the VirtualPathProviders in episerver.config but I have noticed that for files that already existed in the folder concerned the fields removed are still there even if they did not already have a value. Does anyone know how to remove these? For new files it's only the description that is available which is the intention.
Also, is there a way to make the description field mandatory?
Thanks in advance,
The file summary uses an EPiServer XForm definition to handle editing of meta data. You can create an XForm in the standard edit mode and export it which also support data validation and required fields. The data hovewer, is not stored in the xform database and is loaded/saved when editing the meta data. Because of this, data will not change when changing the definition of the xform. Without testing it I would guess that fields that are no longer present in the form will be removed next time the meta data is saved. I do not know of a way to remove obsolete fields but perhaps there is a way that I'm just not aware of.
I will try creating and exporting a XForm to see how it defines a required field. In terms of previous fields, I know that saving does not remove them even if they do not have a value. I guess the whole record is stored somewhere in the DB and that I would need to purge this somehow for existing images. Hopefully someone else might know how to do this.