CodeForPhilly / CodeForPhilly/stately
Feature: Form designer
- Ngôn ngữ chính
- Python
- Star
- 22
- Fork
- 5
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Mô tả
Using this issue to jot down ideas about the form designer. We could try to reuse dobt's form designer ... but if we _didn't_....
We could use [dragula](https://bevacqua.github.io/dragula/) and HTML5's [contenteditable](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/contenteditable), and simply serialize the DOM.
So there'd be a form area, and a way to add fields to it. Adding an `` would actually add a `
` would have `contenteditable="true"`, letting the user directly edit their contents (which also just updates the DOM).
"Saving" the form would be a matter of exporting `formArea.innerHTML`. Sure, we could serialize it into JSON if we want to, but there may be an advantage to simply storing the HTML. For instance, you could very easily customize it to infinity. We'd just need a way to associate the fields with the data, but that shouldn't be too hard; just require that each field has a `` and use an underscorified_version_of_the_label as the field name.
Sounds like fun!
Hướng dẫn đóng góp
Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này
Hướng nghiên cứu
Không có tệp, bài kiểm thử hoặc điểm vào nào được nêu. Hãy bắt đầu bằng cách chuyển khu vực biểu mẫu được đề xuất, hành vi của dragula, các nhãn và mô tả contenteditable, cùng việc xuất formArea.innerHTML thành một phạm vi cụ thể; phần hoàn thành cần bao gồm một thiết kế đã được thống nhất và một định dạng lưu trữ bền vững được xác định.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- javascript
- Lĩnh vực
- frontend
- Loại issue
- Tính năng
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Cần làm rõ
- Mức phù hợp với người mới
- 25/100