I need to be able to present a list of available bundles (in this case, Commerce Line Item types) as a select field on an entity, so I can use the value in a custom module. Suggestions?
I've tried creating a select list (using commerce_line_item_type_get_name) and then populating the field's "allowed values" programmatically, but the problem is that when bundles are added/removed, I can't change the allowed values if data is already stored. I don't actually need this kind of data management, as it doesn't matter if stored values reference a bundle that no longer exists. Perhaps I don't need a select list, but a textfield with a dropdown menu input widget or something? I would appreciate any advice on how to proceed.