form-builder
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseForm Builder Skill
表单构建技能
Overview
概述
This skill enables creation of intelligent document forms using docassemble - a platform for guided interviews that generate documents. Create questionnaires that adapt based on answers.
本技能支持使用docassemble创建智能文档表单——docassemble是一个用于生成文档的引导式访谈平台。你可以创建根据答案自适应的调查问卷。
How to Use
使用方法
- Describe the form or document you need
- Specify conditional logic requirements
- I'll create docassemble interview YAML
Example prompts:
- "Create an intake form for new clients"
- "Build a conditional questionnaire for legal documents"
- "Generate a multi-step form for contract generation"
- "Design an interactive document assembly form"
- 描述你需要的表单或文档
- 指定条件逻辑要求
- 我将生成docassemble访谈YAML文件
示例提示:
- "创建新客户信息收集表单"
- "为法律文档构建带条件逻辑的调查问卷"
- "生成用于合同创建的多步骤表单"
- "设计交互式文档组装表单"
Domain Knowledge
领域知识
Interview Structure
访谈结构
yaml
metadata:
title: Client Intake Form
short title: Intake
---
question: |
What is your name?
fields:
- First Name: first_name
- Last Name: last_name
---
question: |
What type of service do you need?
field: service_type
choices:
- Contract Review
- Document Drafting
- Consultation
---
mandatory: True
question: |
Thank you, ${ first_name }!
subquestion: |
We will contact you about your ${ service_type } request.yaml
metadata:
title: Client Intake Form
short title: Intake
---
question: |
What is your name?
fields:
- First Name: first_name
- Last Name: last_name
---
question: |
What type of service do you need?
field: service_type
choices:
- Contract Review
- Document Drafting
- Consultation
---
mandatory: True
question: |
Thank you, ${ first_name }!
subquestion: |
We will contact you about your ${ service_type } request.Conditional Logic
条件逻辑
yaml
---
question: |
Are you a business or individual?
field: client_type
choices:
- Business
- Individual
---
if: client_type == "Business"
question: |
What is your company name?
fields:
- Company: company_name
- EIN: ein
required: False
---
if: client_type == "Individual"
question: |
What is your date of birth?
fields:
- Birthdate: birthdate
datatype: dateyaml
---
question: |
Are you a business or individual?
field: client_type
choices:
- Business
- Individual
---
if: client_type == "Business"
question: |
What is your company name?
fields:
- Company: company_name
- EIN: ein
required: False
---
if: client_type == "Individual"
question: |
What is your date of birth?
fields:
- Birthdate: birthdate
datatype: dateField Types
字段类型
yaml
fields:
# Text
- Name: name
# Email
- Email: email
datatype: email
# Number
- Age: age
datatype: integer
# Currency
- Amount: amount
datatype: currency
# Date
- Start Date: start_date
datatype: date
# Yes/No
- Agree to terms?: agrees
datatype: yesno
# Multiple choice
- Color: color
choices:
- Red
- Blue
- Green
# Checkboxes
- Select options: options
datatype: checkboxes
choices:
- Option A
- Option B
# File upload
- Upload document: document
datatype: fileyaml
fields:
# Text
- Name: name
# Email
- Email: email
datatype: email
# Number
- Age: age
datatype: integer
# Currency
- Amount: amount
datatype: currency
# Date
- Start Date: start_date
datatype: date
# Yes/No
- Agree to terms?: agrees
datatype: yesno
# Multiple choice
- Color: color
choices:
- Red
- Blue
- Green
# Checkboxes
- Select options: options
datatype: checkboxes
choices:
- Option A
- Option B
# File upload
- Upload document: document
datatype: fileDocument Generation
文档生成
yaml
---
mandatory: True
question: |
Your document is ready.
attachment:
name: Contract
filename: contract
content: |
# Service Agreement
This agreement is between **${ client_name }**
and **Service Provider**.
## Services
${ service_description }
## Payment
Total amount: ${ currency(amount) }
Date: ${ today() }yaml
---
mandatory: True
question: |
Your document is ready.
attachment:
name: Contract
filename: contract
content: |
# Service Agreement
This agreement is between **${ client_name }**
and **Service Provider**.
## Services
${ service_description }
## Payment
Total amount: ${ currency(amount) }
Date: ${ today() }Example: Client Intake
示例:客户信息收集
yaml
metadata:
title: Legal Client Intake
short title: Intake
---
objects:
- client: Individual
---
question: |
Welcome to our intake form.
subquestion: |
Please answer the following questions.
continue button field: intro_screen
---
question: |
What is your name?
fields:
- First Name: client.name.first
- Last Name: client.name.last
- Email: client.email
datatype: email
- Phone: client.phone
required: False
---
question: |
What type of matter is this?
field: matter_type
choices:
- Contract: contract
- Dispute: dispute
- Advisory: advisory
---
if: matter_type == "contract"
question: |
Contract Details
fields:
- Contract Type: contract_type
choices:
- Employment
- Service Agreement
- NDA
- Other Party: other_party
- Estimated Value: contract_value
datatype: currency
---
mandatory: True
question: |
Thank you, ${ client.name.first }!
subquestion: |
**Summary:**
- Name: ${ client.name }
- Email: ${ client.email }
- Matter: ${ matter_type }
We will contact you within 24 hours.yaml
metadata:
title: Legal Client Intake
short title: Intake
---
objects:
- client: Individual
---
question: |
Welcome to our intake form.
subquestion: |
Please answer the following questions.
continue button field: intro_screen
---
question: |
What is your name?
fields:
- First Name: client.name.first
- Last Name: client.name.last
- Email: client.email
datatype: email
- Phone: client.phone
required: False
---
question: |
What type of matter is this?
field: matter_type
choices:
- Contract: contract
- Dispute: dispute
- Advisory: advisory
---
if: matter_type == "contract"
question: |
Contract Details
fields:
- Contract Type: contract_type
choices:
- Employment
- Service Agreement
- NDA
- Other Party: other_party
- Estimated Value: contract_value
datatype: currency
---
mandatory: True
question: |
Thank you, ${ client.name.first }!
subquestion: |
**Summary:**
- Name: ${ client.name }
- Email: ${ client.email }
- Matter: ${ matter_type }
We will contact you within 24 hours.