TYPO3 7 tx_form with captcha



我试图实现我的tx_form的验证码扩展。该表单正常工作,并显示带有输入字段的验证码代码。

我不确定要去哪里以及何时触发功能:

$response = GeneralUtility::_GP('captchaResponse');
    if (ThinkopenAtCaptchaUtility::checkCaptcha($response)) {
      // Captcha valid
      ...
    } else {
      // Captcha invalid
      ...
    }

到目前为止我的表格:

enctype = multipart/form-data
method = post
prefix = tx_form
confirmation = 0
postProcessor {
        recipientEmail = someMail
        senderEmail = someMail
    }
10 = TEXTLINE
10 {
    type = text
    name = 2
    required = required
    label {
        value = Name:*
    }
}
20 = TEXTLINE
20 {
    type = text
    name = 3
    required = required
    label {
        value = E-Mail-Adresse:*
    }
}
30 = TEXTLINE
30 {
    type = text
    name = 4
    required = required
    label {
        value = Telefon:*
    }
}
40 = TEXTLINE
40 {
    type = text
    name = 5
    required = required
    label {
        value = Firma:*
    }
}
50 = TEXTLINE
50 {
    type = text
    name = 6
    required = required
    label {
        value = Funktion:*
    }
}
60 = TEXTLINE
60 {
    type = text
    name = 8
    required = required
    label {
        value = PLZ:*
    }
}
70 = TEXTLINE
70 {
    type = text
    name = 9
    required = required
    label {
        value = Ort:*
    }
}
80 = TEXTAREA
80 {
    cols = 40
    rows = 5
    name = 7
    required = required
    label {
        value = Ihr Anliegen:*
    }
}
100 = TEXTBLOCK
100 {
    text (
<img style="width:200px; height:auto;" src="/index.php?eID=captcha" />
 <input type="text" size=30 name="captchaResponse" value="">
    )
}
105 = SUBMIT
105 {
    name = 10
    type = submit
    value = Senden
}

您将需要为此实现自己的完成者。我建议使用https://extensions.typo3.org/extension/pxa_form_enhancement/或类似。

相关内容

  • 没有找到相关文章

最新更新