简体   繁体   English

Drupal-形式或内容类型和一般如何做?

[英]Drupal - form or content type and general how to do it?

(I know there is a module, but I'm trying to learn on my own) (我知道有一个模块,但是我想自己学习)

I basically want some kind of form or page where I create a form for an administrator. 我基本上想要某种形式的表单或页面,用于为管理员创建表单。

So, the administrator can fill in the question and can add more than one right answer. 因此,管理员可以填写问题并可以添加多个正确答案。 Sorta like a multiple choice question with more than one answer. Sorta就像一个多选题,有多个答案。

The user will go ahead and answer the question. 用户将继续回答问题。

Do, I create a content type? 我创建内容类型吗? Do I use form api instead. 我改用表格api吗? Not sure at this moment how to go about it. 目前尚不确定该如何处理。

Thanks. 谢谢。

The Quiz module provides tools for authoring and administering quizzes through Drupal. 测验模块提供了用于通过Drupal创作和管理测验的工具。 A quiz is given as a series of questions, with only one question appearing per page. 测验由一系列问题组成,每页仅出现一个问题。 Scores are then stored in the database. 然后将分数存储在数据库中。

From what I get, you can create a custom drupal module and use form api for creating Multipage forms and add pragmatically add validaters for adding you correct result before moving to the next page/form. 据我所知,您可以创建一个自定义的drupal模块,并使用表单api创建多页表单,并实用地添加验证器,以便在移至下一页/表单之前添加正确的结果。

Writing a simple. 写一个简单的。 Hope this helps and contact if you need help. 希望这对您有所帮助,并在需要帮助时与您联系。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM