It's not a switch statement that's causing the problem, it's the switch (-ified parameters) parser ...
But the fix is similar ... ad_set_form_values calls ad_set_element_value and should have a "--" separating the arg that names the element and the value. I'll fix this and commit to the 4.6 branch today.