frappe-syntax-clientscripts

Installation
SKILL.md

Frappe Client Scripts Syntax

Client Scripts run in the browser and control all UI interactions in Frappe/ERPNext. Create them via Setup > Client Script or in custom apps under public/js/.

CRITICAL: Client Script validations ONLY apply in the browser form view. API calls and System Console bypass them. ALWAYS pair with Server Scripts for security-critical validation.

Quick Reference

Action Code
Set value frm.set_value('field', value)
Get value frm.doc.fieldname
Hide field frm.toggle_display('field', false)
Make mandatory frm.toggle_reqd('field', true)
Make read-only frm.toggle_enable('field', false)
Set field property frm.set_df_property('field', 'options', [...])
Filter Link field frm.set_query('field', () => ({filters: {}}))
Call server frappe.call({method: 'path.to.fn', args: {}})
Call doc method frm.call('method_name', {args})
Related skills
Installs
30
GitHub Stars
95
First Seen
Mar 25, 2026