diff --git a/frappe/website/doctype/web_form_field/web_form_field.json b/frappe/website/doctype/web_form_field/web_form_field.json index 90ec99c3b8..860029cce2 100644 --- a/frappe/website/doctype/web_form_field/web_form_field.json +++ b/frappe/website/doctype/web_form_field/web_form_field.json @@ -17,6 +17,7 @@ "options", "max_length", "max_value", + "precision", "property_depends_on_section", "depends_on", "mandatory_depends_on", @@ -143,11 +144,19 @@ "fieldtype": "Code", "label": "Read Only Depends On", "options": "JS" + }, + { + "depends_on": "eval:in_list([\"Float\", \"Currency\", \"Percent\"], doc.fieldtype)", + "description": "Set non-standard precision for a Float or Currency field", + "fieldname": "precision", + "fieldtype": "Select", + "label": "Precision", + "options": "\n0\n1\n2\n3\n4\n5\n6\n7\n8\n9" } ], "istable": 1, "links": [], - "modified": "2022-11-21 17:41:52.139191", + "modified": "2024-01-08 13:21:06.272248", "modified_by": "Administrator", "module": "Website", "name": "Web Form Field", diff --git a/frappe/website/doctype/web_form_field/web_form_field.py b/frappe/website/doctype/web_form_field/web_form_field.py index c6fa4f5dc9..208d31096a 100644 --- a/frappe/website/doctype/web_form_field/web_form_field.py +++ b/frappe/website/doctype/web_form_field/web_form_field.py @@ -56,6 +56,7 @@ class WebFormField(Document): parent: DF.Data parentfield: DF.Data parenttype: DF.Data + precision: DF.Literal["", "0", "1", "2", "3", "4", "5", "6", "7", "8", "9"] read_only: DF.Check read_only_depends_on: DF.Code | None reqd: DF.Check