Im trying to add new items to a select1 Xform control in codebehind. It works well getting the new item in to the select1 box, with both Value and Label.
Having selected the new value and submitting the form the new value (item) is not present in the FormData XML. Selecting one of the predefined items works.
ArrayList formControls = form.ExtractXFormControls(); foreach (XFormControlBase control in formControls) { Select1 EPIselect = control as Select1; if (EPIselect != null) if (EPIselect.Reference == "ToEmailSelect") { SelectItem si = new SelectItem(); si.Label = "testLabel"; si.Value ="testValue"; EPIselect.Choices.Add(si); } }
Is this a dead-end? Is Xform comparing the selected index with database data? And when adding new items they exceeds the index?
Hi
Im trying to add new items to a select1 Xform control in codebehind. It works well getting the new item in to the select1 box, with both Value and Label.
Having selected the new value and submitting the form the new value (item) is not present in the FormData XML. Selecting one of the predefined items works.
Is this a dead-end? Is Xform comparing the selected index with database data? And when adding new items they exceeds the index?
Has any one tried doing something like this?
Janne Saare