Read about OpenEMR's Response to the COVID-19 Pandemic at

List box items not displaying

Please kindly assist me on this,
I have designed a patient registration form. On submitting the form, information is successfully added to both demographics and history tables, but on the patient’s record, everything displays well except multiple list box items are not displaying, even though i can see them in the database as comma separated values. the sample codes are as follows:
On form:
Right Breast
Normal Skin
Nipple everted (normal)
Nipple retracted

On php form processor:
$skin = implode(",",$_POST[“skin”]);
"INSERT INTO history_data (skin) VALUES (’$skin’);

When submitted, the data is stored in database as:
normal skin, scar, dimple, nipple everted (normal), nipple retracted

Can you post two screenshots. One of the LBF where the form is described by the layout. The other screenshot of where the form is not displaying the dropdown.
In the On php form processor. The list is being imploded to a string. When the string retrieved from the database, the code could be looking for an array and it is getting a string. Have you checked your php log file for errors or check the browser console for errors?

1 Like

Hi Sherwin,
This looks similar to this issue. LBV form with history field not saving/updating
Maybe you could consider Mark’s issue as you look into this.
I’m recovering from surgery and while i’d love to help, code makes no sense to me currently.


Thank you @juggernautsei and @sjpadgett for your contributions.
What I did was to change $skin = implode(",",$_POST[“skin”]); to $skin = implode("|",$_POST[“skin”]); and make the names in the options to correspond with list item IDs.
That resolved it