Module Builder - Programmatically retrieve dropdown items from Choice field type
I created a module that contains a custom field of type Choice. I am building a Widget that contains a form which saves data to the module. I'd like the dropdown in the widget to contain the same choices that were added to the custom field. Is this possible?
Hello David,
Since once the Choice Field's Choices collection has been populated by you, you won't be able to change it, then why don't you directly hardcode the same values into your widget's dropdown? There is no need to dynamically populated these items each time the widget loads, as they will remain the same.
Greetings,