I have a Drupal 7 webform when I need to dynamically populate a select field's options. I'm currently using hook_form_alter() and setting the values on the like so:
<?php $form['submitted']['left']['select_field_name']['#options'] = $new_options; </php>
This works for displaying the new options on the webform creation but the values are not saved with the form.
I know there is a hook_webform_select_options_info() hook to create predefined options but it does not take any parameters so I have no way to pass a value from the webform to tell it how to dynamically create the options.
Is there any way to create a dynamic select option list and have it save the values that were not in the original Webform select values list?