From 095b6301c399f37d7159cbb64cb7b01765cf1168 Mon Sep 17 00:00:00 2001 From: UmakanthKaspa Date: Mon, 13 Oct 2025 11:26:19 +0000 Subject: [PATCH] feat: add placeholder field to web form field doctype --- .../web_form_field/web_form_field.json | 13 ++++++-- .../doctype/web_form_field/web_form_field.py | 30 ++----------------- 2 files changed, 12 insertions(+), 31 deletions(-) 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 02d794e546..1bcc3100e7 100644 --- a/frappe/website/doctype/web_form_field/web_form_field.json +++ b/frappe/website/doctype/web_form_field/web_form_field.json @@ -26,7 +26,8 @@ "section_break_6", "description", "column_break_8", - "default" + "default", + "placeholder" ], "fields": [ { @@ -152,17 +153,23 @@ "fieldtype": "Select", "label": "Precision", "options": "\n0\n1\n2\n3\n4\n5\n6\n7\n8\n9" + }, + { + "fieldname": "placeholder", + "fieldtype": "Data", + "label": "Placeholder" } ], "istable": 1, "links": [], - "modified": "2024-04-15 16:11:58.469820", + "modified": "2025-10-13 16:53:27.147994", "modified_by": "Administrator", "module": "Website", "name": "Web Form Field", "owner": "Administrator", "permissions": [], + "row_format": "Dynamic", "sort_field": "creation", "sort_order": "DESC", "states": [] -} \ No newline at end of file +} 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 e6f07899e3..8c6a7023b1 100644 --- a/frappe/website/doctype/web_form_field/web_form_field.py +++ b/frappe/website/doctype/web_form_field/web_form_field.py @@ -19,34 +19,7 @@ class WebFormField(Document): depends_on: DF.Code | None description: DF.Text | None fieldname: DF.Literal[None] - fieldtype: DF.Literal[ - "Attach", - "Attach Image", - "Check", - "Currency", - "Color", - "Data", - "Date", - "Datetime", - "Duration", - "Float", - "HTML", - "Int", - "Link", - "Password", - "Phone", - "Rating", - "Select", - "Signature", - "Small Text", - "Text", - "Text Editor", - "Table", - "Time", - "Section Break", - "Column Break", - "Page Break", - ] + fieldtype: DF.Literal["Attach", "Attach Image", "Check", "Currency", "Color", "Data", "Date", "Datetime", "Duration", "Float", "HTML", "Int", "Link", "Password", "Phone", "Rating", "Select", "Signature", "Small Text", "Text", "Text Editor", "Table", "Time", "Section Break", "Column Break", "Page Break"] hidden: DF.Check label: DF.Data | None mandatory_depends_on: DF.Code | None @@ -56,6 +29,7 @@ class WebFormField(Document): parent: DF.Data parentfield: DF.Data parenttype: DF.Data + placeholder: DF.Data | None precision: DF.Literal["", "0", "1", "2", "3", "4", "5", "6", "7", "8", "9"] read_only: DF.Check read_only_depends_on: DF.Code | None