Custom form configuration #268

Merged
tobru merged 34 commits from 165-form-configuration into main 2025-11-10 14:49:33 +00:00
2 changed files with 2 additions and 15 deletions
Showing only changes of commit 59e7a75c51 - Show all commits

View file

@ -560,7 +560,7 @@ class CustomFormMixin(FormGeneratorMixin):
field = self.fields[field_name]
field_type = field_config.get("type")
field.label = field_config.get("label", field_config["name"])
field.label = field_config.get("label", field_name)
field.help_text = field_config.get("help_text", "")
field.required = field_config.get("required", False)

View file

@ -23,13 +23,8 @@
"minItems": 1,
"items": {
"type": "object",
"required": ["name", "type", "label", "controlplane_field_mapping"],
"required": ["type", "label", "controlplane_field_mapping"],
"properties": {
"name": {
"type": "string",
"description": "Unique field name/identifier",
"pattern": "^[a-zA-Z_][a-zA-Z0-9_]*$"
},
"type": {
"type": "string",
"description": "Field type",
@ -97,14 +92,6 @@
"type": "string",
"enum": ["email", "fqdn", "url", "ipv4", "ipv6"]
}
},
"generators": {
"type": "array",
"description": "Array of generator function names (for future use)",
"items": {
"type": "string",
"enum": ["suggest_fqdn_from_name"]
}
}
}
}