adding dependsOn attribute in dynaforms

This commit is contained in:
Fernando Ontiveros
2025-09-03 07:05:44 -04:00
parent b00d2745e0
commit 8c00b078ea

View File

@@ -90904,6 +90904,12 @@ FormDesigner.leftPad = function (string, length, fill) {
type: "textarea", type: "textarea",
placeholder: "payload".translate() placeholder: "payload".translate()
}; };
this.dependsOn = {
label: "dependsOn".translate(),
value: "",
type: "textarea",
placeholder: "[array of fields]".translate()
};
this.maxLength = {label: "max length".translate(), value: 1000, type: "text", regExp: /^[0-9]+$/}; this.maxLength = {label: "max length".translate(), value: 1000, type: "text", regExp: /^[0-9]+$/};
this.formula = {label: "formula".translate(), value: "", type: "button", labelButton: "edit...".translate()}; this.formula = {label: "formula".translate(), value: "", type: "button", labelButton: "edit...".translate()};
this.mode = { this.mode = {
@@ -91268,7 +91274,7 @@ FormDesigner.leftPad = function (string, length, fill) {
if (type === FormDesigner.main.TypesControl.text) { if (type === FormDesigner.main.TypesControl.text) {
this.pf = ["type", "variable", "var_uid", "dataType", "protectedValue", "id", "name", "label", "tabIndex", this.pf = ["type", "variable", "var_uid", "dataType", "protectedValue", "id", "name", "label", "tabIndex",
"defaultValue", "placeholder", "hint", "ariaLabel", "required", "requiredFieldErrorMessage", "textTransform", "defaultValue", "placeholder", "hint", "ariaLabel", "required", "requiredFieldErrorMessage", "textTransform",
"validate", "validateMessage", "maxLength", "formula", "loadDropdownOptions", "mode", "operation", "dbConnection", "validate", "validateMessage", "maxLength", "formula", "dependsOn", "loadDropdownOptions", "mode", "operation", "dbConnection",
"dbConnectionLabel", "sql", "memoryCache"]; "dbConnectionLabel", "sql", "memoryCache"];
if (this.owner instanceof FormDesigner.main.FormItem) { if (this.owner instanceof FormDesigner.main.FormItem) {
this.operation.type = "hidden"; this.operation.type = "hidden";
@@ -91291,7 +91297,7 @@ FormDesigner.leftPad = function (string, length, fill) {
} }
if (type === FormDesigner.main.TypesControl.dropdown) { if (type === FormDesigner.main.TypesControl.dropdown) {
this.pf = ["type", "variable", "var_uid", "dataType", "protectedValue", "id", "name", "label", "tabIndex", this.pf = ["type", "variable", "var_uid", "dataType", "protectedValue", "id", "name", "label", "tabIndex",
"defaultValue", "placeholder", "hint", "ariaLabel", "required", "requiredFieldErrorMessage", "loadDropdownOptions", "mode", "datasource", "defaultValue", "placeholder", "hint", "ariaLabel", "required", "requiredFieldErrorMessage", "dependsOn", "loadDropdownOptions", "mode", "datasource",
"dbConnection", "dbConnectionLabel", "sql", "memoryCache", "dataVariable", "options"]; "dbConnection", "dbConnectionLabel", "sql", "memoryCache", "dataVariable", "options"];
if (this.owner instanceof FormDesigner.main.GridItem) { if (this.owner instanceof FormDesigner.main.GridItem) {
this.pf.push("columnWidth"); this.pf.push("columnWidth");
@@ -91346,7 +91352,7 @@ FormDesigner.leftPad = function (string, length, fill) {
} }
if (type === FormDesigner.main.TypesControl.suggest) { if (type === FormDesigner.main.TypesControl.suggest) {
this.pf = ["type", "variable", "var_uid", "dataType", "protectedValue", "id", "name", "label", "tabIndex", this.pf = ["type", "variable", "var_uid", "dataType", "protectedValue", "id", "name", "label", "tabIndex",
"defaultValue", "placeholder", "hint", "ariaLabel", "required", "requiredFieldErrorMessage", "loadDropdownOptions", "mode", "datasource", "defaultValue", "placeholder", "hint", "ariaLabel", "required", "requiredFieldErrorMessage", "dependsOn", "loadDropdownOptions", "mode", "datasource",
"dbConnection", "dbConnectionLabel", "sql", "memoryCache", "dataVariable", "options", "delay", "resultsLimit", "dbConnection", "dbConnectionLabel", "sql", "memoryCache", "dataVariable", "options", "delay", "resultsLimit",
"forceSelection"]; "forceSelection"];
if (this.owner instanceof FormDesigner.main.GridItem) { if (this.owner instanceof FormDesigner.main.GridItem) {