Search

Hello,

I'm creating a product database that consists of several categories, which in turn each have their own subcategories. I've created sections for both of these, where the subcategory is associated with a single parent category.

When an admin user creates a new product, they can select the appropriate category and subcategory. The problem is I'm not sure how to limit the subcategory choices based on the category they have selected. Right now they get a list of all subcategories and, therefore, can select one that is invalid.

What's the best approach for resolving this?

Thanks, Justin

Hi Justin,

I'm afraid at this point in time there isn't anything to let you do this out of the box. However I was working on something to make what you described possible, just not finished yet.

Small question, are you using the association ui to select the categories and sub categories?

Jon

Hi Jon,

I'm currently using the Select Box Link. I tried the Association UI, but couldn't figure out how to restrict it to a single selection.

Justin

Hi Justin,

The Select Box Link is more limiting, if you had to use the Association Field, with the Association UI it would be much simpler for this to work.

Restricting the Association UI to a single section, should work in the same way as the Select Box Link, when setting it up do not select more than 1 linked section to a field. The UI also has search functionality, with some tinkering it's possible to get it to return filtered entities. Check if you can migrate to an Association Field, it would certainly simplify the next steps.

Create an account or sign in to comment.

Symphony • Open Source XSLT CMS

Server Requirements

  • PHP 5.3-5.6 or 7.0-7.3
  • PHP's LibXML module, with the XSLT extension enabled (--with-xsl)
  • MySQL 5.5 or above
  • An Apache or Litespeed webserver
  • Apache's mod_rewrite module or equivalent

Compatible Hosts

Sign in

Login details