Main Content

Magnolia Community Forums: Get help with Magnolia: Make SelectField values dependent of selection of another SelectField


  • carlos-avila
    carlos-avila
    Full name: Carlos A
    Posts: 15
    Last post: May 30, 2016 4:35:04 PM
    Registered on: Aug 26, 2015
    Make SelectField values dependent of selection of another SelectField
    #1 by carlos-avila on Oct 2, 2015 5:52:42 PM

    Hello guys!

    Is it possible to make values listed in a SelectField dependent of the selected value of another SelectField?

    For instance, depending on a category selected in a select field, make a second one display only subcategories of the selected category.

    If this isn't possible, are there any approaches to achieve sth similar?

  • rkovarik
    rkovarik
    Full name: Roman Kovařík
    Posts: 67
    Last post: Jul 28, 2017 8:05:02 AM
    Re: Make SelectField values dependent of selection of another SelectField
    #2 by rkovarik on Oct 5, 2015 9:49:51 AM

    Hi Carlos,
    create a custom switchable field with nested select fields (override info.magnolia.ui.form.field.factory.SwitchableFieldFactory#createFieldComponent).

    Roman

  • br-joseanand
    br-joseanand
    Full name: Jose
    Posts: 1
    Last post: Jul 12, 2017 6:41:20 AM
    Registered on: Jul 12, 2017
    Re: Make SelectField values dependent of selection of another SelectField
    #3 by br-joseanand on Jul 12, 2017 6:41:20 AM

    Hi Roman,

    I'm new to magnolia and I have similar requirement. Could you please provide example codes to explain this?

  • marvink2
    marvink2
    Full name: Marvin Kerkhoff
    Posts: 31
    Last post: Sep 8, 2017 3:14:02 PM
    Re: Make SelectField values dependent of selection of another SelectField
    #4 by marvink2 on Jul 12, 2017 10:13:47 AM

    Hi,
    you don't need to code for this. Just by configuration it's possible to add switchable fields. See here https://documentation.magnolia-cms.com/display/DOCS/Switchable+field

You don't have the permission to post on this thread

Sign in

To login on this forum, you can use your Magnolia Forge, Support or Partner account, or, below, your Google, Yahoo! or OpenID account. If you have trouble logging in, or any other sort of issue, please let us know in the Meta forum, on the user-list, or simply by email at forum-admin at magnolia-cms dot com.

* Required

... or sign in with:

  • icon http://{your-openid-url}
  • icon
  • icon https://me.yahoo.com/