Commit 9468e121 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 28d081b3
Loading
Loading
Loading
Loading
+3 −4
Original line number Diff line number Diff line
@@ -46,14 +46,13 @@ function riddler_captcha($op, $captcha_type = '', $captcha_sid = NULL) {
        $result = [];

        $result['solution'] = $riddleEntity->getSolution();
        $result['form']['captcha_riddle'] = [
          '#markup' => '<p><strong>' . $riddleEntity->getQuestion() . '</strong></p>',
        ];

        $result['form']['captcha_response'] = [
          '#type' => 'textfield',
          '#title' => t('Answer the question here:'),
          '#title' => t('What\'s the correct answer?'),
          '#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'],