Use the <attachment> tag to provide a widget for uploading files to a record.
Use this tag:
- on the form page to attach files to a new record created via the form.
- with recordId, tableName attributes to attach a file to an existing record. In this case, the attributes are mandatory.
Available attributes:
Attribute | Type | Mandatory | Description |
---|---|---|---|
recordId | String | N | Specify the ID of the record to bind with the attachment widget. The recordId attribute is mandatory, if tableName is set. |
tableName | String | N | Specify the name of the table for the record to which this tag is bound. |
isReadOnly | Boolean | N | Enable or disable attaching files. It is possible to attach files via the widget if the attribute value is 'false'. It is not possible to attach files via the widget if the attribute value is 'true'. |
attachment
<attachment tableName={data.table_name} recordId={data.record_id}></attachment>