Question

I have a webform with a multiselect box. I want to use the prepopulate module to allow people to set the default value in the URL. The following works, but it only supports selecting one value:

/mywebform?edit[submitted][multiselect_name]=Value

Other places have suggested using URLs like the following, but that doesn't work for either one URL or multiple:

/mywebform?edit[submitted][multiselect_name][]=Value

When I pass multiple URL parameters, it just takes the last one, so Value2 is selected in the following example rather than Value and Value2:

/mywebform?edit[submitted][multiselect_name]=Value&edit[submitted][multiselect_name]=Value2

As a workaround, I could define custom GET parameters for each item in the webform using the webform module, but I was hoping to make everything consistent, and as far as I can tell, webform doesn't support GET parameters that use array notation (as per http://drupal.org/node/824606), so neither of the following works as the default in the webform module:

%get[edit][submitted][multiselect_name]
%get[edit[submitted][multiselect_name]]

Thanks for the help!

No correct solution

Licensed under: CC-BY-SA with attribution
Not affiliated with drupal.stackexchange
scroll top