Skip to main content

Add/Edit Form

info

Path: Exchange/Pika View/Component/Form/Main

The Add/Edit Form is a form that dynamically adapts to the indicated table by automatically supplying editable fields that correspond to columns in the table. It also features a "read-only" mode for simple display of the data.

An example of the Add/Edit form with 3 fields

Parameters

NameTypeDescription

headerConfig

dictionary

Config options for the display of the header of the Form.

{
# the text that appears in the header
'headerText': '',
# flag that allows the form to be closed via an icon
'isClosable': True,
# flag that controls header visibility
'isVisible': True
}

model

dictionary

Configuration model attributes and columns used to create fields on the Form.

{
'attribute': {
# optional - set to use a specific config for this table, leave null to use default
'configId': null,
'schema': '',
'tableName': ''
},
# list of column metadata rows, obtained from retrieveModelMetadata
'columns':[]
}

readOnly

boolean

True sets Form into read-only mode. Defaults to False.

recordId

any

The primary key of the record being edited, if applicable.

rowData

dictionary

A json dictionary representing the data of the row being edited/displayed.

Examples

Header Customization

The Add/Edit form with a header that says "A Demo Example:"

headerConfig Parameter
{
"headerText": "A Demo Example:",
"isClosable": false,
"isVisible": true
}

Read-Only Mode

Setting the readOnly parameter to True renders an Add/Edit Form without any inputs, and will instead display each field for the row as a text string. Useful for displaying a summary of a piece of data without allowing data to be changed. A read-only version of the Add/Edit Form