You need to sign in to do that
Don't have an account?
Cable Guy.ax375
Parsing dropdown element and pass value to hidden field
I have a dropdown on Visual Force page with the options look like the following:
January -- FY 2010
February -- FY 2010
March -- FY 2010
April -- FY 2010
......
......
On the visual force page, how should I parse the selected option to pass them to two hidden fields: hiddenMonth, hiddenYear so that hiddenMonth will have value of month and hiddenYear will have value of year?
Any help will be greatly appreciated.
Hi,
Use String.spilt('--') function in apex to split the selected picklist value in controller. The result will be arrary of "January" and "FY 2010" (like ['January','FY 2010']. you can then use this array to set hidden variables in apex.