Bind two dropdowns to one sharepoint field
We have two dropdowns in BPC form. It's the case of localization, so each dropdown is for one language and has different data source. For end user only one of them is visible at the time and we want to save the selected value to the same text field, doesn't matter what language is used.
- Set both dropdowns to save value as text - in 'Title' format, not 'ID#Title'
- Leave both dropdowns to be unbound
- Create one textbox control 'c_hiddenProductSelection', move it to Hidden controls and bind it to the text field
- Add script to both dropdowns (on Scripts tab) - to get dropdown selected value and set up hidden control value
var currentChoice = form.GetControl("c_Product").GetValue();