Join us this Friday for AI in Action at the Virtual Happy Hour! This free virtual event is open to all—enroll now on Academy and don’t miss out.
Join us this Friday for AI in Action at the Virtual Happy Hour! This free virtual event is open to all—enroll now on Academy and don’t miss out.
I'm not sure if there is a much better way.
The code sample that exists under download also use ControlsCreated: http://world.episerver.com/Download/Categories/Download-Type/Code-Samples/XForms/How-to-replace-the-submit-button-with-custom-content-for-an-xform/
Is there a supported way to do "control injection" on an X-Form? I would like EPiServer to use my controls (which are derived from their controls).
I'm doing it now, but it's ugly. I catch "ControlsCreated," and do this:
So, essentially, I empty the Controls collection and rebuild it, swapping some of EPiServer's controls for my own.
(And, yes, I considered a Control Adapter, but some of EPiServer's methods in their X-Form controls are protected (RenderLabel, for instance), so they can't be called from the outside. By deriving the object, I get around this.)
Any ideas?