I'm building a form editing page using the Formio editor and renderer.
I'd like to make specific form fields mandatory in the form editor. [different than making the field entry mandatory during submission]
There are two roles in the application -
Editor - Modifies the formio definition.
User - Submits the form data.
I'm specifically interested in making several 'meta-data' fields mandatory for the Editor. The Editor should not be able to remove certain fields from the formio component list.
A couple options I'm considering for implementation -
- When the form is saved, inspect the form components and ensure the mandatory fields exist, and if they dont, create them.
- Set a flag in the UI for specific components so they are 'disabled' and cannot be removed in the formio editor.
Has anyone implemented this?