飞书问卷为什么乱序:field-create 与 form-questions-create 的本质区别
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 17.3k
- Forks
- 1.4k
- Avg merge
- 2d 4h
- Merged PRs (30d)
- 105
Description
飞书问卷为什么乱序:field-create 与 form-questions-create 的本质区别
背景
用户要求按 10 道题的顺序生成飞书问卷。我(Claude)选择的实现路径是:
+base-create创建 Base+field-update把默认字段改名为 Q1+field-delete× 3 删掉多余默认字段+field-create× 9 依次添加 Q2–Q10+form-create创建表单视图
用户指出最终问卷题目顺序错乱,并给出了正确做法——单次调用 +form-questions-create,把所有题目作为一个数组提交。
两种做法的差异
| 维度 | claude 的做法(+field-create + +form-create) | gpt 的做法(+form-questions-create) |
|---|---|---|
| 操作层级 | 数据表的列(字段 / field) | 表单视图的题目(question) |
| API 语义 | "加一个字段",无位置参数 | "按数组顺序写入题目",位置即下标 |
| 顺序控制 | 间接,由服务端默认排序决定 | 直接,由客户端数组顺序决定 |
| 必填项 | 字段层无 required | 每题可单独 required: true/false |
| 题目标题 | 强等于字段名 | 可独立于字段名,更口语化 |
| 评分组件 | 用 select 1-5 模拟 | number + style.rating 原生五星 |
| 选项展示 | 不能配 option_display_mode | 可配下拉 / 平铺 / 单行 |
| 题目复用 | 一字段一表单强绑定 | 同字段可在多表单定制不同标题/必填 |
教训
做问卷不能走"建字段 → 建表单"这条路。
- 字段层(field) 管的是:数据存在哪、什么类型。
- 题目层(question) 管的是:用户看到什么、什么顺序、是否必填、用哪种 UI 组件。
两层混用就会出现"我在字段层努力,结果题目层不听话"的情况。+field-create 只能保证字段都建好了,保证不了题目按预期顺序展示——这是路径本身的固有缺陷,不是命令参数写错了。
该选哪条路
- 正经发问卷收集 → 必须
+form-questions-create。能控顺序、控必填、控题型组件(如五星评分)、控选项展示样式。 - 只要一张能存数据的表 + 顺手有个录入入口 → 字段层就够用。
下次类似任务,应直接用 +form-questions-create,不再走字段层。
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
The issue names +field-create, +form-create, and +form-questions-create but no repository file, test, or requested edit. Start by locating the documentation or command definitions for these entry points; done should be a clear explanation of when to use each path and how question ordering is controlled.
Written by the indexing model from the issue text.
Assessment
- Domain
- cli, documentation
- Issue type
- Documentation
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100