Skip to content
Mark Lee edited this page Jun 19, 2018 · 1 revision

In order to provide more than just read only data, a forms system needed to be added into the app. A single app block and a set of form elements provide a flexible way to meet the needs of administrators. The FormBlock expects a list of FormElementItems in the Attributes. It should be with the key "FormElementItems" and serialized in JSON.

When a form posts back it will be sent to the MobileBlockResponse in the plugin block. The request will be the key of the form element which caused it to call back. The Body will contain the key values in the response. The block should then return a FormResponse serialized in JSON in the Response. The FormResponse can give a success or failure, action items, a message, or a new form to render.

In order for Workflow to work in the app the field types need to be converted to FormElementItems. There are a set of auto-converters already exist. New converters can be created by extending FieldTypeConverter and decorating the class with [ConvertForFieldType( typeof( nameOfFieldType ) )]. There is an optional EndocdeValue and DecodeValue which can be used to translate the values of more complex field types.

Clone this wiki locally