I needed more precomposed options lists for one of my clients, and implemented the following;
In _webform_options_info() I added a line:
$items = array_merge($items, module_invoke_all('option_info'));
This allows other modules to specify additional option lists the same way webform does this, by implementing [my_module]_option_info(), returning an array with titles and references to functions that produce arrays with options.
Comments
Comment #1
quicksketchWe already allow other modules to provide a list of select list options. webform_webform_select_options_info() is just Webform's implementation of its own hook. See the _webform_select_options_info() function in select.inc to see where we already call the hooks.