How would I to inject Client Resources in a common Layout for only those pages that actaully contain an epi Form? If I add these to the header and footer, everything works. My concern is that I only want to inject them for pages that contain a form block.
You can define your element which require client resource, then just declare the resources path. Forms will load your resources automatically. Please sample here: https://github.com/episerver/EPiServer.Forms.Samples/blob/master/Implementation/Elements/AddressesElementBlock.cs
(The method GetExtraResources)
Would I need to override each built in form element. I'm current trying to loop over all the current page blocks and determine if any are of type FormContainerBlock. My issue is that I can't figure out how to get blocks for XHtmlString and ContentAreas before the page saving event. Right now I'm using the page Saved event and getting page SoftLinks to deterine if any are of type FormContainerBlock.