client-scripts

Implement Frappe client scripts for form events, dialogs, and UI customization.

48|23|Updated Mar 17, 2026
One-click install
npx skills add https://github.com/tody-agent/codymaster --skill client-scripts-tody-agent
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: client-scripts
Source: https://github.com/tody-agent/codymaster/tree/main/skills/cm-frappe-agent/skills/client-scripts
Command: npx skills add https://github.com/tody-agent/codymaster --skill client-scripts-tody-agent

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Frappe developers face inconsistency and maintenance overhead when implementing client-side behaviors across forms, dialogs, and UI customization. This Skill provides a structured reference for writing reliable form events, field manipulation, dialogs, and desk UI tweaks to streamline development.

Core Features & Use Cases

  • Patterns for common client-side tasks in Frappe, including form events (setup, onload, refresh, validate), field manipulation, dialogs, prompts, and API interactions.
  • Guidance on wiring client scripts to Doctype forms, managing child tables, and creating responsive UI elements that improve user experience.
  • Use cases cover automatic defaults, dynamic field visibility, custom buttons, prompts, and server calls from client scripts.

Quick Start

Create a client script that automatically hides a field until the user selects a related value on a Doctype form.

Frequently Asked Questions about client-scripts

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

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

Frappe client scripts use patterns for form events like setup, onload, refresh, and validate to manipulate fields and customize UI. You wire these scripts directly to Doctype forms for responsive, maintainable client-side behaviors.

What is the best way to create custom dialogs and prompts in Frappe?

Use frappe.Dialog and frappe.prompt APIs to create custom dialogs and prompts. Consistent patterns for these client-side interactions prevent fragmentation and reduce maintenance overhead in Frappe UI customization.

Can I manage child tables and dynamic field visibility from Frappe client scripts?

Yes, Frappe client scripts can manage child tables and control dynamic field visibility on Doctype forms. By leveraging frappe.ui.form events, you can hide or show fields automatically based on user selections.

How do I make API calls from the client side in a Frappe application?

Make API calls from the client side using standard Frappe APIs within your client script. Structured patterns ensure reliable server calls alongside custom buttons and desk UI tweaks.

Does writing Frappe client scripts require prior knowledge of specific JavaScript APIs?

Yes, implementing maintainable Frappe client scripts requires knowledge of frappe.ui.form events, frappe.prompt, frappe.Dialog, and common client-script APIs to ensure responsive and reliable UI behaviors.

Why are my Frappe client-side scripts inconsistent across different Doctype forms?

Frappe client-side scripts become inconsistent without structured patterns for form events, field manipulation, and dialogs. Applying consistent client-script APIs solves fragmentation and streamlines UI maintenance across forms.