Q&A掲示板(【コメント】ページ一覧・【コメント】Q&A掲示板)
// Ver0.2.0 Google reCAPTCHAスクリプト追加
$form .= '<script src="https://www.google.com/recaptcha/api.js?render='
. SPAM_FILTER_RECAPTCHA_SITEKEY . '"></script>' . "\n";
$form .='<script>grecaptcha.ready(function() {';
$form .='grecaptcha.execute(\'' . SPAM_FILTER_RECAPTCHA_SITEKEY
. '\', {action: \'homepage\'}).then(function(token) {';
$form .='var recaptchaResponse = document.getElementById(\'recaptchaResponse\');';
$form .='recaptchaResponse.value = token;});});</script>' . "\n";
$form .='<input type="hidden" name="recaptchaResponse" id="recaptchaResponse" />' . "\n";