Support » Fixing WordPress » [Plugin : Contact Form 7] change default quiz with random

  • Resolved pistian

    (@pistian)


    I would like to change the default quiz with random numbers and I tried this: (/includes/classes/classes.php at row 301)

    case 'quiz':
    if ( count( $raw_values ) == 0 && count( $values ) == 0 )
    { // default quiz
    $rand_num = rand(0, 9);
    $rand_num2 = rand(0, 9);
    $sum = $rand_num + $rand_num2;
    	$raw_values1[] = $rand_num.'+'.$rand_num2.'=?|'.$sum;
    	$values[] = $rand_num.'+'.$rand_num2.'=?';
    }

    ..but it doesn’t works. Answer is wrong even if the sum is correct.

    Any ideas. Are there any problems in the hashing?
    Thanks in advance

Viewing 1 replies (of 1 total)
  • Solved. There was an error in $raw_values1[]. It should be $raw_values[].
    What a noob!!

    Anyway.. I hope this helps somebody else.

    Thanks for this plugin.
    Cheers

Viewing 1 replies (of 1 total)
  • The topic ‘[Plugin : Contact Form 7] change default quiz with random’ is closed to new replies.