Support

Account

Home Forums Front-end Issues Activate group field dynamically, from true/false field

Solved

Activate group field dynamically, from true/false field

  • Hi,

    First thanks for the plugin, it’s really helpful.

    I’ve several group fields, related to a custom taxonomy, some are always active, but others should only be active, depending on a true/false field value.

    Is there any way, to do so without hitting the update button, and activate/deactivate those field groups, everytime the user changes the value of true/false field?

    Thanks in advance, for all the help given.

    Jps

  • Field group location cannot be set based on a field in a different field group. The best alternative is to create tabs for the different sections all in the same field group and have the tabs/fields be conditional on the true/false field.

  • Hi John,

    Thanks for your reply, I’m relatively new with ACF, so that’s why I’m trying to figure out the best solution for this issue.

    My problem isn’t where the true/false field will be located, I think, since the true/false field exists only to activate/deactivate the rest of the group fields it makes all the sense, that he belongs to that group.

    Do you have any example of how this can be achieved?

    Thanks in advance.
    Jps

  • I don’t have an example. You would create the true/false field and then create tab fields. The tab fields would use conditional logic to decide if they are shown or hidden based on the true/false field or some other toggle field. An overview of conditional logic settings can be found here http://www.advancedcustomfields.com/resources/field-settings/

  • Yes, you’re right in the first place. The issue was that the true/false wasn’t in the same group.
    .. That simple… Putting it in same group, the condition as appeared.

    Thanks for all the help!

Viewing 5 posts - 1 through 5 (of 5 total)

The topic ‘Activate group field dynamically, from true/false field’ is closed to new replies.