You need jQuery for this example. This example uses the extension t3jquery. Note: this example works only with radio-buttons, checkboxes and select-options questions! Test it with this TypoScript:
plugin.tx_myquizpoll_pi1.isPoll = 0 plugin.tx_myquizpoll_pi1.templateFile = EXT:myquizpoll/examples/template_quiz_jquery2.html plugin.tx_myquizpoll_pi1.myVars.answers { input_radio = id="answer1",id="answer2",id="answer3",id="answer4",id="answer5",id="answer6" input_checkbox = id="answer1",id="answer2",id="answer3",id="answer4",id="answer5",id="answer6" input_wrap = ,,,,, } plugin.tx_myquizpoll_pi1.userData.askAtQuestion = 0 plugin.tx_myquizpoll_pi1.pageQuestions = 1 # if you dont always include jQuery: includeLibs.t3jquery = EXT:t3jquery/class.tx_t3jquery.php page.11 = USER page.11.userFunc = tx_t3jquery->addJqJS
###VAR_QUESTION_IMAGE### |
###RESULT_FOR###:
###NAME###: ###REAL_NAME###
###EMAIL###: ###REAL_EMAIL###
###HOMEPAGE###: ###REAL_HOMEPAGE###
###NO_SUBMIT###
###DOUBLE_ENTRY###
###NOT_LOGGEDIN###
###CHEATING###
###USE_JOKERS###: - ###JOKER_50### - ###JOKER_PHONE### - ###JOKER_AUDIENCE###
###ANSWER_JOKER###: none :-(
###NO_MORE###
Highscore-list. You can use this markers too in TEMPLATE_HIGHSCORE_ENTRY: ###VAR_PERCENT###, ###VAR_MAX###, ###VAR_O_MAX###, ###VAR_TIME###, ###VAR_FE_UID###, ###VAR_PAGE_NAME### (page with plugin) and ###VAR_FOLDER_NAME### (page of result records).
And if you use groupBy: ###VAR_NUM_QUIZ### (num. of solved quizes).
###NUMBER### | ###POINTS### | ###PERCENT### | ###NAME### | ###DATE### |
---|---|---|---|---|
###VAR_COUNT### | ###VAR_POINTS### | ###VAR_O_PERCENT### | ###REF_HIGHSCORE_QUIZ_TAKER### | ###VAR_DATE### |
And if you use groupBy: ###LINK_DETAIL### (link to a detailed highscore).
###VAR_NAME_AND_EMAIL### ###VAR_TO_HOMEPAGE######HIGHSCORE_URL###
Show all questions and correct answers in the email. (You can use ###REF_QR_ANSWER_ALL### instead of ###REF_QR_ANSWER_CORR### and you can use ###VAR_QUESTION### and ###VAR_QUESTIONS###) ###REF_QUESTION_IMAGE_BEGIN###Email to admin (if email.send_admin > 0):
1. Reference to TEMPLATE_QUIZ_USER_SUBMITED or TEMPLATE_POLL_SUBMITED
2. Reference to TEMPLATE_QUIZ_ANALYSIS_x. x depends on "showAnalysis". REF_QUIZ_ANALYSIS will be empty if showAnalysis and showEvaluation = 0 !
3. Reference to TEMPLATE_EMAIL_ALLANSWERS if "showAllCorrectAnswers = 1".
Email to quiz taker (if email.send_user > 0):
1. Reference to TEMPLATE_QUIZ_USER_SUBMITED or TEMPLATE_POLL_SUBMITED
2. Reference to TEMPLATE_QUIZ_ANALYSIS_x. x depends on "showAnalysis". REF_QUIZ_ANALYSIS will be empty if showAnalysis and showEvaluation = 0 !
3. Reference to TEMPLATE_EMAIL_ALLANSWERS if "showAllCorrectAnswers = 1".