This seems to be because the css file does not load. If I copy the frappe/public/js/lib/datepicker/datepicker.min.css file into the Style Editor in Firefox, it looks fine.
The forms corresponding to the Healthcare module (Lab Test, Prescription and Patient Appointment) don’t have a “Save” or “Cancel” button, as in other forms (like Personal details or Addresses), so I cannot create new data not edit existing ones.
The form fields corresponding to Link FieldType don’t pull the data from the linked DocType. This seems to be the case with v11, but in v10 (specifically v11.1.58) the Link fields pull the corresponding data (I tried with the “Country” Link field in “Addresses” form).
This is my setting:
ERPNext version: v11.1.4 (tried with v11.1.3 first)
1 - bench build should help
2 - These documents are created by system users and portal users are only allowed to view. However, turning on “Allow Edit” in webform configuration should enable these buttons.
3 - “Allow Read On All Link Options” should be turned on for link fields to allow read rights to portal Users
The bench build command ran correctly but still having the same issue. (This builds all the js/css files, but I didn’t find the “datepicker.min.css” file in this list.) I ran bench start afterward and it seems to rebuild all the files again (is this the right behavior?). Previously, I tried bench update --build with the same result as bench build.
I made a workaround inserting the following code on erpnext/healthcare/web_form/patient_appointments/patient_appointments.js:
(This works but of course it’s not the ideal solution)
That’s precisely why it’s strange. All my web forms have “Allow Edit” On. As I mentioned, the “Cancel” and “Save” buttons appear in “Personal Details” and “Addresses” Web Forms. I attach the screenshots of my settings.
The second issue happens because, in the erpnext/healthcare/web_form/patient_appointments/patient_appointments.py file, the read_only property is forced to be 1. That’s why in the frappe/website/doctype/web_form/templates/web_form.html template the {% if not read_only and has_header %} never meets.
So, the solution is to remove the read_only property setting.
This helped me as I was struggling why the link field doesn’t load for non-system users. Finally figured out that it’s because of this tick: “Allow Read On All Link Options”