I am presenting a brief overview of the approach followed by me during my previous project on input-form configuration.
I created an InputFormImporter which imported the input-forms from a default XML file present in the /config folder into the database. This was necessary for loading the default form.
The basic API additions were as follows-
It had basic methods for creating a new inputform and updating the DB.
It had basic methods for creating a new inputform-field and map it to the corresponding metadata_field_id
It had methods for creating a new page and adding fields to it.
Methods to add new selection list or remove an existing one.
Methods to add a new selection-list element and map it to a selection-list.
The code for these new classes is available at ---
I will add more details as required once this part of the project is started.
Following tables were added.
Columns-
inputform_id - Primary key to represent the particular form
name - String vale of the inputform name
Columns-
id(PK)
collection_id(FK)
inputform_id(FK)
Columns-
page_id(PK)
name
id(PK)
form_id(FK)
page_id(FK)
field_id
repeatable
inputtype_id(FK)
label(FK)
hint(FK)
field_id(FK)
page_id(FK)
valuepair_id(PK)
name
inputtype_id(FK)
valuepair_element_id
language
stored_value
displayed_value
valuepair_id
inputtype_id(FK)
name
Screenshots are attached.