Form Engine Json Schema Storage

Form Engine issue and Suggestion I have been investigating how the form engine saves its form schemas In HTML form entry, the forms are saved in a table htmlformentry_html_form in a table xml_data. The two implementation use (03 and 2.x htmlformentry) use the same architecture until the saving of the actual form schema. For the O3 implementation, the forms are saved in clob_datatype_storage, and for HTML form entry they are saved in htmlformentry_html_form.

The Issue Currently, encounters require a form that saves them to render on edit. Forms that were previously saved by HTML form entry can not be edited given that the form_id referenced on them don’t have equivalent JSON Schemas to support editing them

Suggestion We need to find a way of linking the two HTML form entry schema and the JSON schema to access the data created by either schema. One suggestion is to use the htmlformentry_html_form and add a column json_data given that we have another column called xml_data. This way we do not create new forms but rather add a json schema to the existing form

@dkayiwa @pirupius @dennis @samuel34 @grace

Couple of things here:

htmlformentry_html_form

This table only exists if an implementation is using HFE, so it’s somewhat inappropriate to use for a general storage of forms.

As a general rule, we do have a feature that allows editing forms in HFE in the O3 frontend, specifically by setting the htmlFormEntryForms setting. (I should say, this works by switching the user to the O2 editing UI, configurable here). This is a little painful to use as it requires configuring the UUID of each HFE form; the difficulty here is that the form table by itself (and consequently the form resource) gives us no way of knowing what form engine should be used for that form definition.

It’s probably not possible to exactly duplicate HFE forms and JSON Schema forms, except in the case of the simplest of forms, but, in theory, you could also just attach a JSON Schema form that is capable of producing the same set of obs, orders, etc. to the form via the form_resource table and have something editable in both HFE and the O3 form engines.

2 Likes