From 36bc3461b2d85fd2110fcb0885a6c42b57ebd0e3 Mon Sep 17 00:00:00 2001 From: Aaron Louie Date: Thu, 2 Jan 2020 11:36:32 -0500 Subject: [PATCH] Updated Home (markdown) --- Home.md | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/Home.md b/Home.md index 50693db..ece48a1 100644 --- a/Home.md +++ b/Home.md @@ -1,7 +1,11 @@ # CR Connect Workflow Engine + + ## Workflow Configuration + ### Form Field Types in Camunda Modeler + By default, Camunda Modeler supports a very limited set of form field types. To provide more complete support on the front end, we use the form field Property attributes. You will need to add the following custom types (select `custom type` in the Type dropdown): @@ -26,7 +30,10 @@ Then to display each of the following types of form fields, set the type and, in | Telephone number | `tel` (Custom Type) | n/a | n/a | | Email address | `email` (Custom Type) | n/a | n/a | + ### Form Field Configuration + + #### Hiding fields Fields can be hidden and shown conditionally with a Javascript expression, which will be parsed on the front end by [Formly](https://formly.dev/guide/expression-properties). You can reference any other fields in the form using the prefix `model` in front of its Form Field ID. For example, if you have a `boolean` field with ID of `hasUploadedFile`, you can access its value with `model.hasUploadedFile` in the Formly expression. @@ -35,6 +42,7 @@ Fields can be hidden and shown conditionally with a Javascript expression, which | ------------- | -------------------------- | | `hide_expression` | `!(model.someBooleanFieldName && (model.enumFieldName === 'Other'))` | + #### Required fields To make a field required by default, add the following Validation Constraint: @@ -45,19 +53,20 @@ To make a field required by default, add the following Validation Constraint: If a field needs to be filled out based on the value of some other field(s) in the form, you can use a Formly Javascript expression (see above). - | Property > Id | Property > Value (example) | | ------------- | -------------------------- | | `required_expression` | `!(model.someBooleanFieldName && (model.enumFieldName === 'Other'))` | #### Help text + There are three places where help text will be displayed on the front end when the form is rendered: - Placeholder text: appears within the field if it is empty - Description text: appears below the field - Help dialog text: appears in a pop-up when the `?` button next to the field is clicked. [Markdown formatting code](https://github.com/adam-p/markdown-here/wiki/Markdown-Cheatsheet#links) is supported for this field, but you will need to replace all line breaks with `\n` (for now). To display each type of help text, add a custom property: + | Type of help text | Property > Id | Property > Value (example) | | ----------------- | ------------- | -------------------------- | | Placeholder text | `placeholder` | `Enter your email address here` |