Tell us what you are trying to do?
I have two custom fields
1) materials
2) colors
the material Metal has colors like White and Black
the material Wood has colors like Red and Blue
I create a custom post type named jewels
When I add jewel A, I set material as Metal and color as White
I add jewel B and set material as Metal and color as Black
I add jewel C and set material as Wood and color as Blue
In the view form, I would like to have the search fields Colors that should depends on Material, So if I filter for Wood I aspect to see only Red and Black (if they are available or not is not important), today in the color select I see all the colors that are non dependent on Material choice
Thanks,
Gianni
Hi, have you tried the setting "Only show available options for each input"? It is described in more detail at this link:
https://toolset.com/documentation/user-guides/front-page-filters/advanced-settings-custom-search/
Basically when you turn on this feature, the options for each custom search filter are dependent upon the other options you have already selected.
Hi Christian,
thanks for you reply.
Let me try to explain another case: I have 2 fields: one is type and the other colors.
Type is: A,B,C and color is C1, C2, C3, C4
May I assign to type A color C1 and C2, and assign to type B C1, C3, C4, and assign to type C colors C4
In this way,. in the view if I select type A I will see only C1 and C2 (in the select colors) if them are available ?
Thanks
Hi,
just a clear example, hope it will be..
If I choose a "finitura" (see screen1) Matrix the view shown correctly the 2 models with "finitura" = Matrix, if I open the select "seleziona il colore" instead of showing only the colors (seleziona il colore) available for the "finitura" Matrix, that should be bianco luna and pino Oregon, it is showing all colors with are available for the models Brio and Springs.
Does it make sense for you ?
Thanks,
Gianni
May I assign to type A color C1 and C2...In this way,. in the view if I select type A I will see only C1 and C2 (in the select colors) if them are available ?
Not exactly, no. Custom field options for Type and Color are not "assigned" to other field options. Instead, the assignment is automatic based on the Model posts on your site.
In other words, let's say there is a Model post where Type A and Color C1 are both selected. There is another Model post where Type A and Color C2 are both selected. There are no Model posts where Type A and Color C3 are both selected. There are no Model posts where Type A and Color C4 are both selected. If your site content is created this way, when you select Type A in the filters, only Colors C1 and C2 will be available in the Color filter. The filter options depend on the content of your site, not any connection between fields in wp-admin. I hope this helps clarify the "Only show available options for each input" feature.