Dropdown on Xforms won’t save value.

(Alejandro Ramirez) #1

Hello @dkayiwa

I’ve created a drop down on my form using the following concepts: Ethnicity: Question, Coded(Latino, Other).

Latino:MISC, text Other:MISC, text I added the concept to the schema and the design surface.

Widget Properties: -Single Select -Visible -Enabled

When I submit the form the value selected is not saved, the form presents the field as blank, but if I edit the encounter and modify the value the value is saved.

Any ideas on this?


(Daniel Kayiwa) #2

Is that field on the form schema? https://wiki.openmrs.org/display/docs/XForms+Module+User+Guide

(Alejandro Ramirez) #3

Yes, field is added onto the for schema.

(Daniel Kayiwa) #4

While in the form designer, select “Save As” from the “File” menu and then paste the file contents at pastebin.com

(Alejandro Ramirez) #5


(Daniel Kayiwa) #6

Can you share a screenshot with this field highlighted on the openmrs form schema page (where you drag and drop concepts) as mentioned here https://wiki.openmrs.org/display/docs/XForms+Module+User+Guide

(Alejandro Ramirez) #7


(Daniel Kayiwa) #8

Can you share another screenshot for the properties of Ethnicity when you click on it from this screen?

(Alejandro Ramirez) #9

(Daniel Kayiwa) #10

Since it is concept, drag and drop it under the OBS node. The PATIENT node takes person attribute types.

In the form designer, you will need to delete it both under form fields and from the design surface. Then save. After modifying the form schema as directed above, you will need to go back to the form designer’s form fields and right click to select Refresh, in order to see the field show up.

(Alejandro Ramirez) #11

Fixed it, the error is caused from the type of concept used to create the coded answers in the question. Where the field is inserted should be irrelevant as that is just a grouping.