AEM Forms 6.3 - guidetheme2 css being included




I want to remove all default css from my forms as it is clashing with the CSS for the project.

I can see a CSS file I want to stop being included in the following in the HTML:

I matched this up to the JSP file in the guidecontainer via  /libs/fd/af/components/guideContainer/guideContainer.jsp

This calls /libs/fd/af/components/guideContainer/includeTheme.jsp which does the following:

        String themeOverride = request.getParameter(GuideThemeConstants.PARAMETER_THEME_OVERRIDE);


            themeOverride = (String) request.getAttribute(GuideThemeConstants.PARAMETER_THEME_OVERRIDE);



            //We are appending "jcr:content" because 'themeOverride' parameter gives path to theme resource and not it's content resource

            themeOverride += GuideThemeConstants.RELATIVE_PATH_JCR_CONTENT;


        String pageFallbackClientlib = (String) request.getAttribute(GuideConstants.PAGE_FALLBACK_CLIENTLIB_CATEGORY);

        ThemeClientLibData clientLibData = GuideThemeUtils.getClientLibNames(resource, themeOverride, pageFallbackClientlib);

        if(clientLibData.getCommonClientLib() != null) {%>

            <cq:includeClientLib  css="<%=clientLibData.getCommonClientLib()%>"/>

        <%} %>

Outputting the variables involved into the html for debugging I can see that the following:

themeOverride =  /content/dam/formsanddocuments-themes/<MY_THEME>/jcr:content

pageFallbackClientlib = guide.theme2.default

clientLibData.getCommonClientLib() = guide.theme2.common

Here is where I am stuck....given the parameters being passed to clientLibData.getCommonClientLib()  would we expect guide.theme2.common.

  • Can I prevent guide.theme2.common being included without overlaying the guideContainer?
  • I would be interested to know what clientLibData.getCommonClientLib()  does - but don't have the source.

Can anyone help?



View Entire Topic



I'd probably approach this with a 'browser reset' type of approach where you have an intermediary reset that is applied to your form CSS prior to your css being added. Much like the browser resets that are out here but adapted to your forms.

What's the framework that you're using for your site pages that you'd like to have the forms adapt to?