Creating a Quiz/Test with Chronoforms

IT ITHamster 18 Mar, 2013
Hi,

I´m creating a Quiz/Test with Chronoforms. Now I need to know a few things.

1. How do I set a Radiobutton Answer to be the 'correct' answer (want to show this in the Email)
2. Is there a Timer option? (Quiz-time: max 30 mins)
3. Can I use the input data from a test in an other test? (So the user doesn´t have to fill out the form again)

Thanks

Greetings
ITHamster
Gr GreyHead 18 Mar, 2013
Hi ITHamster,

1) I guess you'd have to add the 'marking' in Custom Code. You don't say here how to tell which answers are correct.

2) No, you could possibly set a time in JavaScript but how would you stop people re-loading the quiz in a different browser window?

3) Yes, if you save the data and have a way to identify the user again.

Bob
IT ITHamster 19 Mar, 2013
Thanks for the fast reply.
The Quiz/Test is almost done :-)

1. You´re right. Unfortunately there´s no way to set the Answer as a 'correct' Answer. I will set the Correct answer in the E-Mail the user gets (Your Answer: A - Correct Answer: A). That should be ok.
2. Problem not solved yet
3. Solved the Problem. I´m using the "Data to Session" and "Session to Data" action.(Problem was the Session key wasn´t set)

greetings
ITHamster
IT ITHamster 19 Mar, 2013
Is there a way to send an E-mail to the User input E-Mail-Adress?

ITHamster
Gr GreyHead 20 Mar, 2013
Hi ITHamster,

Yes, Use the To Email on the Dynamic tab in the Email action. Please see this FAQ

Bob
IT ITHamster 21 Mar, 2013
It´s working fine, thanks.

My last problem is to get the number of correct answers. I´m useing jQuery here. I´m now trying to set the value of the corerct Answer to "correct" and count the correct answers checked on the form. But it doesn´t work till now.

arrow-right ITHamster
IT ITHamster 21 Mar, 2013
So now I´ve got the number of the correct answers checked!


var faalle=0;
var fa1=0;
....

// input_radio_1_1 is the correct answer of the first Question:

jQuery(document).ready(function() {
   jQuery('#input_radio_1_1').click(function(){
      var isChecked1 = jQuery('#input_radio_1_1').is(':checked');
       fa1=1;
       sum();
   });
});
....


function sum (){
var faalle = parseInt(fa1) + parseInt(fa2) ...;
alert(faalle);
}


How can I use var faalle in the Email-Template??

Greetings
arrow-right ITHamster
Gr GreyHead 31 Mar, 2013
Hi ITHampster,

Sorry, I'm not very good at JQuery. I would expect that you need to add the value to a hidden form input.

Bob
IT ITHamster 09 Jul, 2013
Thank you for the reply.

So now I need to get the database Entry, for example "Question 1 : correct" and count the correct answers.
I need to use it in the GH Email action. Text needs to be "Correct Answers X out of 50". 50 questions is a fixed.
I´m using the DB save and the DB Record loader with db field cf_uid for this but it´s not working yet.
Gr GreyHead 09 Jul, 2013
Hi ITHampster,

You can do that using PHP in a Custom Code action.

Bob
IT ITHamster 09 Jul, 2013
Ok, the connection is working and I get the Answers from Question 1 but from all Records.
Can I select the current User´s answer?
Gr GreyHead 09 Jul, 2013
Hi ITHampster,

If you have the User ID in the table then you can use that in a WHERE clause to filter the results.

Bob
IT ITHamster 11 Sep, 2013
Yes I created a standard table with all the CF_ Entrys in it.

I have 2 Forms now:
Form1: "Test" - db save - redirect to Form2
Form2: "Testauswertung" - db record loader - (next steps: E-Mail action, ..)

So I submit Form1 and the db save action is writing data to the table. That´s working fine.

But in Form2 I don´t see the data. The link is showing up like ..index.php?option=com_chronoforms&chronoform=Testauswertung without a token and/or cf_uid.
I was using the Tutorial PDFs for this but it´s not working yet.

If I place a hidden field "cf_uid" in the Form, the DB Save action doesn´t save a value for cf_uid to the table (tried this too).

Greetings
:arrow: ITHamster
This topic is locked and no more replies can be posted.