I am trying to figure out how to create custom forms, and I am not having much luck. I thought I would just rename the ‘soap_form’ (copy the directory and change ‘soap’ to ‘dm2fu’ everywhere in the source. The original ‘soap’ file works well (I use it from time to time).
I tried that, and the first issue I encountered was on 6.0.0(3) running on AWS Ubuntu 18.04 LTS. The forms administration page would not recognize that my new directory (custom form) was there. I made sure that the ownership was apache:apache and that the appropriate file permissions were set. Only two forms appeared in the unregistered list, and my new form was not one of them. I have quite a few forms that I have tried from contrib, so there are many registered to begin with (maybe 40 and several disabled).
No worries, I simply added my new form to the registry table with disabled, etc, flags set. I was then able to see the new custom form, do the DB table creation, and enable the form. Adding the form to an encounter also seemed to go well, until I "submit"ed my form. That’s when I encountered the following error instead of the collapsed list of forms of the encounter that I was expecting:
Not Found
The requested URL /interface/forms/DM2FU/save.php was not found on this server.
That file is there. I made sure that the ownership was apache:apache and that the appropriate file permissions were set. You can examine all the files here: GitHub - ralflukner/dm2_fu_form: OpenEMR Diabetes Mellitus Type 2 follow-up form
Not easily discouraged, I tried a recent development openemr (6.1.0) on Ubuntu 20.04 focal (minimal). This time, the unregistered form showed up as expected, I was able to register it, create the DB table, and activate the form without any need to go directly into database tables (such as registry). My error was slightly different (no mention of the file).
Not Found
The requested URL was not found on this server.
On the development server, I also tried copying and renaming example2 from contrib/forms. Same result. I even tried implementing example2 “as is” (no renaming), and that gave the same Not Found … URL error. Now I’m wondering if I need to tackle an Xdebug session, but before I go down that road … any suggestions?
–RBL