Token导航 LogoToken导航TokenDH.com
前端设计操作浏览器github未标认证来源可访问许可证需确认审计提醒

frappe-web-forms冰沙网络表单

Agent Skill

frappe-web-forms 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要围绕仓库状态、代码变更或协作事项进行整理时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

1,529

周安装

65

GitHub Stars

16

下载量

536
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:frappe-web-forms(冰沙网络表单)
来源仓库:https://github.com/lubusin/agent-skills
仓库路径:skills/frappe-web-forms
安装命令:
npx skills add https://github.com/lubusin/agent-skills --skill frappe-web-forms
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/lubusin/agent-skills --skill frappe-web-forms

简介

用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息。

  • 适合在 Codex、Claude、Cursor、Gemini CLI 中围绕仓库状态或协作事项进行整理。
  • 通过 npx skills add 命令从指定仓库安装,需确认权限和维护状态。
  • 使用前建议核实是否会触发联网、命令执行或文件读写操作。
  • frappe-web-forms 属于前端设计类 Skill,可作为该场景下的辅助能力补充。

SKILL.md

Frappe Web Forms

Build public-facing web forms for data collection, submissions, and customer self-service.

When to use

  • Creating forms for external users (no Desk access)
  • Building support/ticket submission forms
  • Collecting customer feedback or registrations
  • Enabling self-service data entry portals
  • Replacing simple portal pages with form-based workflows

Inputs required

  • Target DocType for form submissions
  • Which fields to expose on the web form
  • Authentication requirements (login required vs guest)
  • Whether users can edit/resubmit entries
  • File upload requirements

Procedure

0) Prerequisites

Ensure the target DocType exists and has the fields you want to expose.

1) Create the Web Form

  1. Type "new web form" in the awesomebar
  2. Enter a Title (becomes the URL slug)
  3. Select the DocType for record creation
  4. Add introduction text (optional, shown above the form)
  5. Click "Get Fields" to import all fields, or add fields manually
  6. Set field order and which are required
  7. Publish the form

2) Configure settings

SettingPurpose
Login RequiredRequire authentication before form access
Allow EditLet users edit their submitted entries
Allow MultipleLet users submit more than one entry
Show as CardDisplay in card layout style
Max Attachment SizeLimit file upload sizes
Success URLRedirect after successful submission
Success MessageCustom message after submission

3) Make it a Standard Web Form (app-bundled)

Check "Is Standard" (visible in Developer Mode) to export the form as files:

my_app/
└── my_module/
    └── web_form/
        └── contact_us/
            ├── contact_us.json    # Web form metadata
            ├── contact_us.py      # Server-side customization
            └── contact_us.js      # Client-side customization

4) Add server-side customization

# contact_us.py
import frappe

def get_context(context):
    """Add custom context variables to the web form."""
    context.categories = frappe.get_all("Support Category",
        filters={"enabled": 1},
        fields=["name", "label"],
        order_by="label asc"
    )

def validate(doc):
    """Custom validation before the document is saved."""
    if not doc.email:
        frappe.throw("Email address is required")

    # Prevent duplicate submissions
    existing = frappe.db.exists("Support Ticket", {"email": doc.email, "status": "Open"})
    if existing:
        frappe.throw("You already have an open ticket. Please wait for a response.")

5) Add client-side customization

// contact_us.js
frappe.ready(function() {
    // Handle field changes
    frappe.web_form.on("field_change", function(field, value) {
        if (field === "category" && value === "Urgent") {
            frappe.web_form.set_df_property("description", "reqd", 1);
        }
    });

    // Custom validation
    frappe.web_form.validate = function() {
        let data = frappe.web_form.get_values();
        if (data.phone && !data.phone.match(/^\+?[0-9\-\s]+$/)) {
            frappe.msgprint("Please enter a valid phone number");
            return false;
        }
        return true;
    };

    // Custom after-save behavior
    frappe.web_form.after_save = function() {
        frappe.msgprint("Thank you for your submission!");
    };
});

6) Control permissions

  • Guest access: Uncheck "Login Required" for fully public forms
  • Portal roles: Assign portal roles to control which logged-in users see the form
  • User permissions: Set explicit document-level permissions on the target DocType
  • Row-level access: Use User Permission rules to restrict which records users can edit

7) Style the web form

Web forms use the website theme by default. For custom styling:

<!-- Add custom CSS via Web Form → Custom CSS field -->
<style>
    .web-form-container { max-width: 600px; margin: 0 auto; }
    .web-form-container .form-group { margin-bottom: 1.5rem; }
    .web-form-container .btn-primary { background-color: #2490EF; }
</style>

Verification

  • Web form accessible at the correct URL (/contact-us)
  • All fields render correctly
  • Required field validation works
  • Submission creates the correct DocType record
  • Login requirement enforced (if configured)
  • Edit and resubmit work (if configured)
  • File uploads work within size limits
  • Success message/redirect works after submission
  • Custom Python validation runs on submit

Failure modes / debugging

  • Form not accessible: Check if published; verify URL slug
  • Permission denied on submit: Check DocType permissions for Website User or Guest
  • Fields not showing: Ensure fields are added to the Web Form (not just on the DocType)
  • Custom JS not loading: Check browser console; ensure file path is correct
  • Validation not firing: Verify validate function in Python file returns/throws correctly
  • Duplicate entries: Check "Allow Multiple" setting; add custom duplicate detection

Escalation

  • For DocType schema → frappe-doctype-development
  • For Frappe UI portal apps → frappe-frontend-development
  • For API endpoint access → frappe-api-development

References

Guardrails

  • Validate input server-side: Never trust client validation; check in validate() Python method
  • Use captcha for public forms: Enable reCAPTCHA for guest-accessible forms to prevent spam
  • Sanitize output: Escape user-submitted data when displaying; use frappe.utils.escape_html()
  • Limit file uploads: Set max file size and allowed types for attachment fields
  • Check rate limits: Consider throttling form submissions from same IP

Common Mistakes

MistakeWhy It FailsFix
Missing DocType permissions"Permission denied" on submitGrant Create permission to Website User or Guest role
Not handling file uploadsFiles don't attach to recordConfigure Attach field properly; check upload limits
XSS vulnerabilitiesSecurity riskEscape user input in display; use `
Forgetting to publish form404 errorCheck "Published" checkbox in Web Form
Client-only validationInvalid data in databaseAdd validate() method in web form Python file
Not testing as guest userWorks for admin, fails for usersTest in incognito/logged out mode

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

34.78%
按下载量换算186

Claude

31.32%
按下载量换算168

Cursor

21.75%
按下载量换算117

Gemini CLI

9.71%
按下载量换算52

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

可疑

权限和风险

操作浏览器

该 Skill 可能涉及浏览器控制能力,使用时可能读取或操作网页内容,需要在受控环境中确认权限边界。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在 warning/failed 结果,不能写成本站确认安全。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills