Commit 7987b336 authored by Julian Pustkuchen's avatar Julian Pustkuchen
Browse files

Issue #3111099 by batigolix, Eric_A, AdamPS, Anybody: Generate similar form as captcha module

parent 96cc51ef
Loading
Loading
Loading
Loading
+2 −3
Original line number Diff line number Diff line
@@ -34,14 +34,13 @@ function riddler_captcha($op, $captcha_type = '', $captcha_sid = NULL) {
        $result = [];

        $result['solution'] = $riddle['response'];
        $result['form']['captcha_riddle'] = [
          '#markup' => '<p><strong>' . $riddle['question'] . '</strong></p>',
        ];

        $result['form']['captcha_response'] = [
          '#type' => 'textfield',
          '#title' => t('Answer the question here:'),
          '#description' => t('Answer this question to verify that you are not a spam robot.'),
          '#weight' => 0,
          '#field_prefix' => $riddle['question'],
          '#required' => TRUE,
          '#size' => 15,
          '#attributes' => ['autocomplete' => 'off'],