platform icon indicating copy to clipboard operation
platform copied to clipboard

Size ignored when using dynamic forms (schemaExpression)

Open pgrill79 opened this issue 11 months ago • 0 comments

We use the schemaExpression to dynamically draw forms based on the input of a database, e.g.:

$call("ui_generate_evaluationform", {"ctx": $, "evaluationtype": "#evaluationtype_vaccination" })
"schemaExpression": "$call(\"ui_generate_evaluationform\", {\"ctx\": $, \"evaluationtype\": \"#evaluationtype_vaccination\" })"

gives us

{
  "type": "object",
  "properties": {
    "date": {
      "title": "Date",
      "widget": "date",
      "required": true,
      "size": 2
    },
    "vaccination": {
      "widget": "string",
      "title": "Vaccination",
      "required": false,
      "size": 2
    },
    "vaccine": {
      "widget": "string",
      "title": "Vaccine",
      "required": false,
      "size": 2
    },
    "lotnumber": {
      "widget": "string",
      "title": "Lot number",
      "required": false,
      "size": 2
    },
    "remarks": {
      "widget": "string",
      "title": "Remarks",
      "required": false,
      "size": 2
    }
  }
}

This works fine, beside of the "size" - it seems that this is ignored if using the schemaExpression. All the fields are aligned vertically.

If i use the exact same result of the expression directly in the "schema" property it works and the fields are aligned horizontally

pgrill79 avatar Feb 10 '25 17:02 pgrill79