Vulnerability in EPiServer.Forms
I have created an XForm containing a textbox, two dropdowns, and finally another textbox.
When I receive the submitted XForm in my e-mail, they are in a different order. The content of both of the textboxes are shown first, followed by the content of the dropdowns.
Further testing indicates that the contents of the e-mail is *not* built in the order from the controls collection. (The order from the controls collection is equal to the order of controls in the form.) Instead, it seems that the controls are ordered by their types, so that the e-mail contains the content from all the TextAreas at the beginning, followed by all the Checkboxes, then the Textbozes, and finally the DropdownLists.
Is there any way to configure the XForm in such a manner that the order of the e-mail conent is equal to the order of the form?
(I suppose I could write my own by hooking up to the XForm_BeforeSubmitPostedData event, build and send the e-mail, and suppress the original e-mail, but I was hoping that some built-in functionality already existed.)
This is a bug that was introduced in EPiServer CMS 5 R2 and that has been fixed for EPiServer CMS 6. At the moment there is no work around for CMS 5 R2 except writing a custom handler. I have written a blog post you this can be implemented that might help you:
RegardsLinus EkströmEPiServer Development Team
Exactly what I needed, thank you. :)