简体   繁体   中英

Drupal 7 webform module interpretation of the webform

I'm trying to make a web site with drupal 7 where users have to complete a cuestionary selecting options and the main objective is to return an interpretation of the result.

For example a question can be, do you drive a car without a license? and the optoins yes or no will be the only choices.

But at the end of the cuestionary returning like a new view or a txt where if you selected no in the question then a explanation telling that driving a car without a license is illegal, and that with all the questionary.

For this purpose i'm using module webform ¡, where i can make the questions and adding conditionals, but I don't know how to return this interpretation of the results.

Can you help me please?

You could use the Rules module. You will have to setup a rule firing after the webform is submitted (event "After a webform has been submitted") and execute relevant actions according to the selections of the user. All the webform answers will be available as tokens in the rule conditions.

A quick skeleton of the setup:

Event
After a webform has been submitted

Condition
Webform has name   form-id = [the name of your webform]

Actions
[Add the action you wish to do and use tokens to get the webform answers]

Thanks but the solution I found is ussing quiz module, it also need rules module to work and provides many types of question like true/false or multichoice questions, at the end of each question you can add a feedback and a correct answers and at the end of the quiz, all the questions are shown with the question feedback.

I hope this helps someone in the future.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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