HiI am fetching some values from Database (using forms api and then doing a callserver) .These values are the Option Objects created in the CGI script called by callserver. My problem is the correct values of cities are getting populated based on the state selected in the dcr but when i save the dcr and re-open in edit mode only the values of the options appear which are different from the label initilally selected by the user. This confuses the user.How can I set the set back the label of the option in dcr's drop-down.I have attached te required files. The formsapi part is coded in my datacapture file itself.
If the select list is getting created dynamically, then you have to make sure the exact same select list is created when you open an existing DCR with an existing value as when you create a new DCR with no pre-existing value.If you don't - then you get what you are seeing - the value stays but there is no corresponding label for it or any other item in the intended select list - so all you get is the value from within the DCR which is used as both value and label for the field.