Help with a dynamic select list of flags for webform so I've been trying to implement a 'sample request' feature on my site. I had tried to use the webform views module, which worked except that I couldn't add checkboxes to the view that displayed and webform views doesn't play well with the latest release of webform. 

I found this Sample Request w Views, Flag, and Webform tutorial, which is basically exactly my use case.

I've created my own module, and am stuck with some of syntax in the view and options parsing array function. The article mentions that I need to reference the title of the nodes 'owner' but I'm not 100% on how this applies to my implementation.

I've altered the code so the function names reflect my custom module, my predefined view of my flag, but I can't get the list to show up in my predefined lists options. I think this is because I don't have the right field referencing my node's title, but I'm not sure. Also the dpm() statement didn't fire. 

I know this is a lot, thanks in advance. 

 function webform_hook_select_options_info() { $items = array(); if (function_exists('_MODULE_user_flag_sample_requests')) {
 $items['MODULE_user_flag_sample_requests'] = array(
  'title' =&gt; t("Sample Requests (User Flag list)"),
  'options callback' =&gt; '_MODULE_user_flag_sample_requests',
 );}return $items;} function _MODULE_user_flag_sample_requests() {$view = views_get_view('webform_flag_views', TRUE);$view-&gt;set_display('webform_options');$view-&gt;execute();$options = array();dpm($options);if ($view-&gt;result) {$row_class = $view-&gt;style_options['row_class'];$attributes = $row_class ? " class='$row_class'" : '';
 foreach($view-&gt;result as $item) {
   $options[$item-&gt;nid] = '&lt;a' . $attributes . '&gt;' . render($item-&gt;field_field_img[0]['rendered']) . ' ' . $item-&gt;field_ref_node_title . ' (' . $item-&gt;node_title . ')' . '&lt;/a&gt;';
 }}else {
 $options[0] = t("Nothing");}return $options;}
It is not webform_hook_select_options_info() it is webform_hook_webform_select_options_info().
(If your module name is webform_hook)
The MODULE parts are the places, where you should enter your modul name.
Inside the foreach you need to enter valid fields from your content that listed inside the view.
Be sure that the Flag Modul is working.