Contact form in Quiz

Events happening in the community are now at Drupal community events on www.drupal.org.
scothiam's picture

Hi, love the module!

I was wondering if there was a known way to add a contact info collection form within the flow of the quiz or on the result page of a quiz? This is one of the only features missing in order to use the Quiz module as a contest/promotion engine on my site.

I'm used to creating custom node types with cck to achieve create contact info forms, but I'd like to blend that with the functionality of the Quiz module.

I was thinking about creating a new question type to achieve this... wondering if anyone else has had more success before I begin (not to mention the learning curve, I've never created a module or custom question, but I am keen to dig in).

Thanks!

(i've added a small screen shot of a typical contact form created with CCK)

AttachmentSize
Screen shot 2010-10-06 at 3.07.25 PM.png27.32 KB

Comments

Node create as custom question?

scothiam's picture

Just read this post http://drupal.org/node/552676 "create cck node with php from outside of Drupal", leaning towards doing something like this but instead of doing it outside of Drupal, doing it from within the quiz as a "custom question", and with form fields instead of using a CSV.

... will start studying up on module dev etc...

cheers,
s

You can try using something

zeezhao's picture

You can try using something like the "Short Answer Question" that already exists in quiz, and then add extra cck fields to it if necessary.

Then add it as final question in quiz....

thanks zeezhao!

scothiam's picture

I will try that, would definitely be easier than what I had in mind. Haven't found any documentation on using cck with the quiz questions, but I don't see why it would be different from any other content type?
cheers,

nope...

scothiam's picture

adding more cck fields to a question type, like the 'short answer', creates more fields to the admin while creating the quiz, but not in the quiz :(

complex route: add a content type 'contact info form' with all the cck fields I need. have it 'called' as the last question in a quiz, must be filled out as per that content type before the quiz moves on to the results. This will create a separate node for the contact info data from the quiz results, which may be safer for quizzes that I want to display the results for.
pros: cck fields like 'location' and 'phone', etc. May be safer for storing user data?
cons: I have no idea how to achieve this, yet

less complex route: create a custom quiz question with multiple fields to collect contact info.
pros: just need to wrap my head around creating a new question type, less daunting than the complex route(?)
cons: not a lot of documentation on this. no fancy cck add ons. May be less secure/flexible for storing user data? I'll want to display results of some quizzes, but will never want this contact info displayed to anyone but admins

Apparently cck was in 3.x but

zeezhao's picture

edit: Sorry... cck in quiz right now is only meant for display of additional information on question, and not to get additional information from taker of quiz...

This thread may give some insight into how question is displayed, so that you can add extra field:
http://drupal.org/node/288042

Also, it may mean you need a new question type that allows configuration of number of text fields for input...

oh man!

scothiam's picture

thanks again zeezhao, that would have been perfect! Too bad... thanks for the link, checking it out now.
I'm working on some other solutions, will post progress here once I get to some level of success (looks hopeful for sure).
cheers,

sorry wrong post

deoxyna's picture

sorry wrong post

update:

scothiam's picture

Currently, I'm avoiding this by having all 'contact' info required in the users profile, and restricting the quiz in question to authenticated users.
I'm currently learning the API and will most likely build a simple module to accomplish this when/if needed.
cheers,

progress ?

zuernbernhard's picture

Any progress on the module ?

Quiz

Group organizers

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds:

Hot content this week