Search the Community
Showing results for tags 'field type options'.
Found 1 result
Hi, I have multiple Options fields on a certain page. On an overview page I like to add a filter, which display`s all the distinct value`s of the optionfield, but only the once that are in use. As an addition I would like to have the amount of times this specific value is in use. So: Given the following: 1=ABC 2=DEF 3=FOO 4=BAR I have for examples 5 pages were Page 1 uses 1 Page 2 uses 1 Page 3 uses 2 Page 4 uses 4 Page 5 uses 4 So on the overviewpage I like to have an overview with (note the 3=FOO is not displayed): Options: ABC (1) DEF (1) BAR (2) I know in the API there is a possibility to use $all_options = $field->type->getOptions($field); But I would need the $all_inuse_options ;-) Next to that It would be a nice to have to add the count.