Checkbox-aware autofill + expose field type in list_forms
This commit is contained in:
3
forms.py
3
forms.py
@@ -51,7 +51,8 @@ def list_forms():
|
||||
out = []
|
||||
for fid, spec in FORM_NAMES.items():
|
||||
fm = FIELDMAP.get(fid, [])
|
||||
fields = [{"key": f["key"], "label": f.get("label", f["key"])} for f in fm]
|
||||
fields = [{"key": f["key"], "label": f.get("label", f["key"]),
|
||||
"type": f.get("type", "text")} for f in fm]
|
||||
out.append({"id": fid, "name": spec["name"], "description": spec["description"],
|
||||
"fields": fields})
|
||||
return out
|
||||
|
||||
Reference in New Issue
Block a user