I actually managed to get a proof of concept working.
I think it's a bit of a crude way at the moment but what I did was the following: When a form paragraph is added to a page, I check for the existence of a fieldsets content and populate the page content via the model before super.execute() (overriden execute() method). This assures that the form's fields and fieldsets jcr nodes are available when the page is finally rendered.
To do this, I had to extend the FormParagraph definition class and added required configuration like the paragraph name and the default values to be generated. This is very similar to how SiteMap is to be configured and rendered.
Improvements that I can think of is maybe get the configuration from spring (somebody mentioned Blossom) instead of in the paragraph definition in stk or forms module in magnolia's configuration but I haven't reached that far yet.
I'm open to ideas if anybody else out there has some clever ones. :) On 24/08/2011 11:59, Magnolia Forums (on behalf of superuser) wrote:
Hey Maribel, This sounds like a valid use-case. I seem to remember there is actually a sample of this somewhere. It's not the most elegant and concise kind of code to write though, so if you have suggestions on how this could improve and make your life easier, feel free to shout!
---------------------------------------------------------------- For list details see http://www.magnolia-cms.com/community/mailing-lists.html To unsubscribe, E-mail to: <[email protected]> ----------------------------------------------------------------
