Web Forms logo

Web Forms

Organization
lubusIN
web-forms

Build public-facing web forms for data collection without Desk access. Use when creating customer submission forms, feedback forms, or self-service portals with Frappe Web Forms.

Overview

PublisherlubusIN
Repositoryfrappe-skills
Skill nameweb-forms
Stars
62
Forks
23
Bundled files
1
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 1 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by lubusIN on GitHub. Read the source before you install it.

Installation

Install the Web Forms AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/lubusIN/frappe-skills.git /tmp/frappe-skills
mkdir -p .claude/skills
cp -r /tmp/frappe-skills/web-forms .claude/skills/web-forms
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Web Forms in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Web Forms on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Web Forms is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

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

python
# 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

javascript
// 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:

html
<!-- 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 → doctype-development
  • For Frappe UI portal apps → frontend-development
  • For API endpoint access → 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

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Web Forms AI skill do?

Build public-facing web forms for data collection without Desk access. Use when creating customer submission forms, feedback forms, or self-service portals with Frappe Web Forms.

Why use Web Forms on TypingMind?

Because you install it once and use it with any model. Web Forms is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Web Forms in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/lubusIN/frappe-skills/tree/main/web-forms. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Web Forms?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Web Forms?

As many as you like. As long as a model supports skills, you can use Web Forms with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Web Forms AI skill free?

Yes. It is published on GitHub by lubusIN under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇