Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

In order to cover this pattern and to create such a form in PIPEFORCE, you need these documents in your app:

  • Form Model (Model)Model: Form Data
    This optional JSON contains the values to initially be displayed in the form.

  • Model: Form Schema(Model)
    This is a JSON Schema and describes the fields of your form (the data structure).

  • View: Form Config(View)
    This JSON brings together all parts and defines the layout of your form (the look & feel and position of the fields).

  • Controller: Pipeline(Controller)
    Finally, you create a pipeline which listens to the form submit. After such a submit, the pipeline gets called and can handle the form submit. It can further process the submitted data.

The model and the view documents will be loaded by the form generator which is implemented in the portal. It will render and show a form to the user based on the input documents:

Drawio
mVer2
zoom1
simple0
zoominComment10
inCommentcustContentId02545909774
pageId2545451358
custContentIdlbox25459097741
diagramDisplayNameUnbenanntes Diagramm-1690349147346.drawiolbox1
contentVer3
revision3
baseUrlhttps://logabit.atlassian.net/wiki
diagramNameUnbenanntes Diagramm-1690349147346.drawio
pCenter0
width819
links
tbstyle
height631.5

...

Let’s have a look to all of these parts step by step below.

The Form Data (Model)

The Form Data is a JSON document which provides the data to be displayed in the form.

...

The whole form framework is about loading this data (A), displaying it in a form (B), validating it, copying the values from the form fields into the output data (C) and storing the final output data to the property store by default. The structure of the input data and output data is defined by the same Form Schema (D):

Drawio
mVer2
zoom1
simple0
zoominComment10
inCommentcustContentId02546040833
pageId2545451358
custContentIdlbox25460408331
diagramDisplayNameUnbenanntes Diagramm-1690358780619.drawiolbox1
contentVer2
revision2
baseUrlhttps://logabit.atlassian.net/wiki
diagramNameUnbenanntes Diagramm-1690358780619.drawio
pCenter0
width661
links
tbstyle
height485

...

The JSON format of the output is the same as the format of the input model and must comply with the Form Schema.

The Form Schema (Model)

The Form Schema document describes the fields structure of a Form Model using the JSON Schema specification. For example the type of the field, validation rules, the title and so on.

...

Here is an example of such a Form Schema JSON:

TODO

The Form Config (View)

The Form Config is the central configuration file of a form.

...

here is an example of such a Form Config:

TODO

The Pipeline (Controller)

After the form has been submitted by the user, the output data will be stored in the property store and then a property.created event will be fired by the property store.

...