Hello,
First, love this module!! I recently updated to Webform 7.x-4.0-rc1. After the update, my Webforms that included value sets were broken with an error message: "Missing argument 4 for values_webform_webform_select_options()."
Upon investigating the Webform changelog, it looks like this issue causes the problem: https://drupal.org/node/2064851
It appears that a very small change is needed to values_webform.module
Changing from:
/**
* Callback for the select options list
* @param string $value_set_name
* The name of the value set to load
* @return array
* An array of optionn of options
*/
function values_webform_webform_select_options($component, $flat, $filter, $arguments) {
return values_load_options($arguments['name']);
}
to:
/**
* Callback for the select options list
* @param string $value_set_name
* The name of the value set to load
* @return array
* An array of optionn of options
*/
function values_webform_webform_select_options($component, $flat, $arguments) {
return values_load_options($arguments['name']);
}
seems to resolve the issue (remove $filter). I can submit a patch if that's preferred for testing.
Thanks!
Joy
Comments
Comment #1
drclaw commentedHi,
I think for now a patch would be best. webform-7.x-4.x isn't the recommended release so I'm inclined to keep Values the way it is. With a patch, people using the 4.x version of webform can patch their file (either in a drush make file, or manually). When 4.x gets a full release, I'll apply the patch.
Thanks!
drclaw
Comment #2
drclaw commentedPostponed pending a full release of webform-7.x-4.x
Comment #3
ilfelice commentedFWIW, I can confirm that the above change allows this module to work with Webform 4.
Comment #4
waluyo.umam commentedI am using webform 4.7. This patch works. The values can be loaded into the list.
Comment #5
evanbarter commentedPatch that maintains backwards compatibility.
Comment #7
drclaw commentedFixed! Thanks everyone! I'll roll out a new release after reviewing #2530802: Support i18n_strings