frappe-syntax-clientscripts

Guide Frappe client-side script development for ERPNext forms.

163|53|Updated Jan 14, 2026
One-click install
npx skills add https://github.com/OpenAEC-Foundation/Frappe_Claude_Skill_Package --skill frappe-syntax-clientscripts
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: frappe-syntax-clientscripts
Source: https://github.com/OpenAEC-Foundation/Frappe_Claude_Skill_Package/tree/main/skills/source/syntax/frappe-syntax-clientscripts
Command: npx skills add https://github.com/OpenAEC-Foundation/Frappe_Claude_Skill_Package --skill frappe-syntax-clientscripts

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill provides best-practice guidance for writing and maintaining client-side scripts in Frappe/ERPNext, ensuring consistent, safe, and efficient UI behavior.

Core Features & Use Cases

  • Event registration and handling: register client-side form events using frappe.ui.form.on and respond to field changes.
  • Form field manipulation and server calls: handle set_value/get_value, toggle_display/enable, and make server calls with frappe.call and frm.call.
  • Child table handling and validation: manage dynamic rows, compute fields, and keep UI in sync with data models.

Quick Start

Register a basic client script for a form using frappe.ui.form.on and frm.set_value to handle events.

Frequently Asked Questions about frappe-syntax-clientscripts

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I write Frappe client scripts for ERPNext form events?

Frappe client scripts handle ERPNext form events by registering callbacks with frappe.ui.form.on. You respond to field changes, use frm.set_value or frm.get_value for data manipulation, toggle_display for visibility, and frappe.call for server interactions.

What is the best way to handle validation in Frappe client scripts?

Validation in Frappe client scripts should use async/await within the validate event. This pattern ensures safe, consistent code execution by properly awaiting asynchronous operations before form submission completes.

How do I manage child tables in Frappe client-side scripts?

Child table handling in Frappe client scripts involves managing dynamic rows, computing fields, and keeping the UI in sync with data models. You register events on child table fields to trigger calculations when rows are added or modified.

Does Frappe client scripting support v14 through v16 patterns?

Yes, Frappe client scripting patterns cover v14 through v16. The guidance ensures safe, consistent code through structured event registration, proper query placement, async/await usage in validate, and avoidance of direct DOM manipulation.

Why should I avoid direct DOM manipulation in ERPNext client scripts?

Direct DOM manipulation in ERPNext client scripts breaks UI consistency and bypasses Frappe's form lifecycle. Using frm methods like toggle_display and set_value keeps the UI safely in sync with data models across versions.