EspoCRM – Open Source CRM Application
PHP calendarcontactscrmcrm-platformcrm-systemcustomer-portalcustomer-supportcustomizabledocumentsemail-marketingkanbanleadsopen-sourcephpplatformsales-automationsingle-page-applicationsupport
array field item max length param
Yuri Kuznetsov399bc60525c8
diff --git a/application/Espo/Resources/metadata/entityDefs/OAuthProvider.json b/application/Espo/Resources/metadata/entityDefs/OAuthProvider.jsonindex cfa6c3e4d0..3d75bfbcde 100644--- a/application/Espo/Resources/metadata/entityDefs/OAuthProvider.json+++ b/application/Espo/Resources/metadata/entityDefs/OAuthProvider.json@@ -59,7 +59,8 @@"noEmptyString": true,"allowCustomOptions": true,"storeArrayValues": false,- "displayAsList": true+ "displayAsList": true,+ "maxItemLength": 255},"authorizationParams": {"type": "jsonObject",diff --git a/application/Espo/Resources/metadata/fields/array.json b/application/Espo/Resources/metadata/fields/array.jsonindex 290bfb81a1..249e984b21 100644--- a/application/Espo/Resources/metadata/fields/array.json+++ b/application/Espo/Resources/metadata/fields/array.json@@ -75,6 +75,11 @@"name": "keepItems","type": "bool","hidden": true+ },+ {+ "name": "maxItemLength",+ "type": "int",+ "hidden": true}],"validationList": [diff --git a/client/src/views/fields/array.js b/client/src/views/fields/array.jsindex 70b4b2d2c2..148d3f69da 100644--- a/client/src/views/fields/array.js+++ b/client/src/views/fields/array.js@@ -66,6 +66,7 @@ class ArrayFieldView extends BaseFieldView {* @property {boolean} [allowCustomOptions] Allow custom options.* @property {string} [pattern] A regular expression pattern.* @property {boolean} [keepItems] Disable the ability to add or remove items. Reordering is allowed.+ * @property {number} [maxItemLength] Max item length. If not specified, 100 is used.*//**@@ -165,6 +166,10 @@ class ArrayFieldView extends BaseFieldView {this.noEmptyString = this.params.noEmptyString;+ if (this.params.maxItemLength != null) {+ this.maxItemLength = this.params.maxItemLength;+ }+this.listenTo(this.model, 'change:' + this.name, () => {this.selected = Espo.Utils.clone(this.model.get(this.name)) || [];});diff --git a/schema/metadata/entityDefs.json b/schema/metadata/entityDefs.jsonindex f484a73402..63fcd394e5 100644--- a/schema/metadata/entityDefs.json+++ b/schema/metadata/entityDefs.json@@ -265,6 +265,10 @@"noEmptyString": {"type": "boolean","description": "Don't allow empty string."+ },+ "maxItemLength": {+ "type": "number",+ "description": "Max item length. If greater than 100, than storing array values must be explicitly disabled. As of v9.1."}}}@@ -285,6 +289,10 @@"allowCustomOptions": {"type": "boolean","description": "Allow custom options."+ },+ "storeArrayValues": {+ "type": "boolean",+ "description": "To store values in the ArrayValue table. Enables search capabilities. Enabled by default."}}}