Core: introduction

As stated in the Architecture:

Core functionality is considered functionality that does not or very loosely tie in to particular modules. It is functionality that has meaning on its own without dependencies, but is enriched by modules.

The core really implements the “engine” of Open Forms and hides all the implementation details. It should be fairly stable, but also continually allow for new feature additions, which is a challenging task!

The following Django apps are considered core functionality:

  • openforms.accounts: (staff) user account management

  • openforms.config: application-wide configuration and defaults

  • openforms.forms: designing and building of forms

  • openforms.formio: integration with the form.io frontend library

  • openforms.submissions: persisting and handling of submitted form data

  • openforms.variables: persisting (intermediate) data into variables for further operations

Data model

The following is a simplified relationship diagram of the Django models that relates to forms:

--- Forms model relationship --- erDiagram Category { UUIDField uuid CharField path CharField name } Form { UUIDField uuid SlugField slug CharField name ForeignKey category } FormDefinition { UUIDField uuid CharField name SlugField slug JSONField configuration BooleanField login_required BooleanField is_reusable } FormStep { UUIDField uuid SlugField slug ForeignKey form ForeignKey form_definition BooleanField is_applicable } FormVariable { ForeignKey form ForeignKey form_definition TextField name TextField key CharField source CharField data_type CharField data_format BooleanField is_sensitive_data JSONField initial_value } Form }|--|| Category : category FormStep }|--|| Form : form FormStep }|--|| FormDefinition : form_definition FormVariable }|--|| Form : form FormVariable }|--|| FormDefinition : form_definition

Each Form can have multiple FormStep’s defined, which acts as a proxy model to a FormDefinition (as these can be reusable across forms). The FormDefinition model has a configuration JSON field, holding the form.io configuration.

The submissions data model mirrors this model in some way:

  • A Submission is tied to a Form.

  • A SubmissionStep is tied to a FormStep.

  • A SubmissionValueVariable is tied to a FormVariable.