Create a new form
Introduction
The OpenMRS Form Builder platform simplifies and partially automates the process of generating user interface forms in OpenMRS 3.
Links and ideas that are important to this text:
What is the Form Builder?
The Form Builder is found at this address:
Reference Application: https://dev3.openmrs.org/openmrs/spa/form-builder(opens in a new tab)
The Form Builder is an automation tool/website for auto-generating form schema JSON files which can be later loaded into the Form Engine to auto-create micro-frontend user interface forms.
This means the UI/UX developer does not have to manually create the user interface forms. And any technical/or non-technical person can use the form builder to generate these form JSON files.
How to use the Form Builder
Requirements:
Make sure the Google Chrome browse is installed. Any other browser can also be used.
In the address bar, enter the form builder URL: https://dev3.openmrs.org/openmrs/spa/form-builder(opens in a new tab)
The main login form will open:
After the login form is loaded, enter all the required details in the inputs:
OpenMRS server URL: This is the OpenMRS backend server installation where your concepts are stored.
Username: Use the default i.e.
admin
Password: Use the default i.e.
Admin123
With the correct details entered above, the platform will log you in. You will land on the dashboard illustrated above:
Now, click on Create New Form
in the top right corner to create a new Form schema.
Clicking the button will land you in the interface shown below. Note the preview
and the Interactive Builder
tabs.
Click on the Interactive Builder
tab to open the builder page shown below:
Click on the Start building
text link. and a popup window asking for the form details will show as below:
Enter the form name and form description
Click on create form
to create the form.
Click on the add page
text link below to add a page to your form
Add the page name in the pop up text box.
Click on the Save
button to successfully save the page and proceed.
Next, click on the Add section
text link to add a section to your form.
Add the section name in the pop up text box.
Click save
to save the section added to form.
Click on Add question
text link to add a question to your form.
A question has several metadata which you must add on the popup form entry. These include:
Label
Question ID
: Must be uniqueQuestion type
Field Type
Backing Concept
Mappings
: Auto generate from concept selected
Click Save
to save the question
Click on Preview Form
tab to view how the form will look like when rendered.
Click on the Save
to save your final form. A popup form entry will appear to allow you enter details that include:
Form name
Version
Encounter Type
Description
Finally, the form is ready for adding to the backend for rendering.