[solved] ListIt2 - get options for field definition
Posted: Sun Nov 23, 2014 9:23 pm
I'd like to be able to get the array of options that exist for a specific field definition (e.g. the list of options that are defined for a dropdown control).
I can do that fine if going via a ListIt2 item - I can load an item with ListIt2Loader or in a foreach loop and do:
The problem is that this relies on an item being available. What if my foreach loop returns no items, or the item I try and load with ListIt2Loader has been deleted? I should be able to get the list of options for a field definition even if there are no items existing, because the options exist independent of any items. Does anyone know how to access the list of options without having to load an item?
I can do that fine if going via a ListIt2 item - I can load an item with ListIt2Loader or in a foreach loop and do:
Code: Select all
$item->fielddefs.myfield->GetOptions()