Support

Account

Home Forums Add-ons Flexible Content Field Flexible Content – Hiding the editor

Solving

Flexible Content – Hiding the editor

  • Hello,

    The theme I’m building has two page template types: standard (standard fields – editor, title etc.) and flexible (the user adds components to the page to build the layout).

    The flexible template uses the flexible content add-on to create the components which the user will add to a page.

    What I want to do is hide the WYSIWYG editor when the flexible template is selected in the ‘Template’ option when adding/editing a page. Then, if the standard template is selected, show the editor again.

    Here are the rules for my field group:

    Show field group if:
    Post Type = ‘page’ AND Page Template != ‘Standard Template’

    I’ve also ticked the ‘Content Editor’ option under the ‘Hide on Screen’ options.

    Now, this kind of works (when I select my flexible template, the editor disappears) but when I change the template back to standard, it doesn’t show the editor again until I save and reload the page.

    Is this intended functionality or am I doing something wrong here?

    • Elliot

    • August 6, 2013 at 1:24 pm

    Hi @b3kristy

    The hide/show (CSS) is loaded via AJAX each time a field group is shown/hidden.

    The CSS is only loaded based on the first field group that is shown.

    Perhaps it is the order of field groups which is preventing the correct CSS from loading.

    You can check the CSS returned from the AJAX call in your console log to help you figure out which field group is loading first

  • Hi elliot, Thanks for getting back to me.

    I’m only using one field group at the moment. I basically have one field group called ‘Components’ which I show on the add/edit screen when ‘Default Template’ is selected. Otherwise, I don’t want to show any custom fields. And that works as expected, I select a different template and the field group disappears.

    But, under the options for the components field group, I’m hiding the editor. But, when another template is selected, I want the custom fields to go (which they do) and the editor to come back (which it doesn’t). Is that possible?

    Thanks 🙂

    • Elliot

    • August 8, 2013 at 1:23 pm

    Hi @b3kristy

    Thanks for the clarification. I’ll do some testing and figure out what’s going on.

    Can you also provide a login account for me to test if I can’t replicate it on my end? (you can use a private reply)

    Cheers
    E

  • I only have a local dev version at the moment. If you can’t replicate the problem then I’ll upload it to a test environment so you can take a look.

    Thanks for looking into this for me @elliot

    • Elliot

    • August 14, 2013 at 5:49 pm

    Hi @b3kristy

    Unfortunately, I can’t replicate the issue on my end.

    If you have time to upload a dev, that would be great.

    Thanks
    E

  • This reply has been marked as private.
Viewing 7 posts - 1 through 7 (of 7 total)

You must be logged in to reply to this topic.

We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Cookie Policy. If you continue to use this site, you consent to our use of cookies.