How to Copy field to Layout v5.0.2

Hello everyone in this great community.
I have created a couple of of Layout Based Visit Forms for my practice. I would like to copy a custom field I created from one custom LBF to another.
I noticed that OpenEMR 7 has this feature when creating LBF but I am running OpenEMR 5.0.2 on a local Windows server (Windows 11 OS) with XAMPP v3.2.2 and the phpMyAdmin is v4.5.1 .

I would appreciate is someone showed me how to copy fields between custom LBF. I can find my way around basic functions of phpMyAdmin.
Thanks a lot.

Hello @Mercy_Udele
Copying LBF content is a very tricky process.

The problem is that the different parts of an LBF are stored in different places in the database. The only way to know what parts belong in which forms is that each component has a reference identifier to the form or frame it belongs in. For example, one table in the database has a list of the names of all the LBF forms in the system. Another table has a list of all the control objects (buttons, text areas, etc) in all the LBFs, with an identifier for the LBF that each one is in, and where it is in it.

If one wishes to transfer one field of an LBF, it would require manually tracing all the field’s desired components, backwards from the table of objects through the table of LBF forms, then duplicating them and re-naming them for the new form they would appear in.
Yeah, right! :slight_smile:

You might want to refer to this (old) article to see some of the complexities involved in simply copying an LBF, without also separating out the fields:

This is all to say that it ends up being a lot less work to simply re-code the field in a new form.
Best- Harley

1 Like

Wow! That is a lot of trouble just to copy LBF in my version.

I guess I just have to recode the fields just like you said.

Thanks for the clarification. I appreciate the great job you guys have been doing to help people out.
Cheers