完全に機能する reCAPTCHA ウィジェットがここにあります。これはより大きな HTML FORM の一部であり、返される画像を調整するのが困難です:
<?php echo recaptcha_get_html($public_key); ?>
フォーム自体にパディング/マージンを追加すると、すべてが右に移動しますが、ウィジェットを調整するだけで済みます。私の答えは、この PHP スクリプトを囲むことができる CSS 属性にありますか?
フォーム全体が役立つ場合は、フォーム全体を表示します...ヒントや解決策を事前にありがとうございます。
<form id="feedback" method="post" action="">
<p>
<label for="name">Name:</label>
<input name="name" id="name" type="text" class="formbox"
<?php if ($missing || $errors) {
if(isset($name)){
echo 'value="' . htmlentities($name, ENT_COMPAT, 'UTF-8') . '"';
}
} ?>>
<?php if ($missing && in_array('name', $missing)) { ?>
<span class="warning"><font color="red">Please enter your name</font></span>
<?php } ?>
</p>
<p>
<label for="email">Email:</label>
<input name="email" id="email" type="text" class="formbox"/
<?php if ($missing || $errors) {
if(isset($email)){
echo 'value="' . htmlentities($email, ENT_COMPAT, 'UTF-8') . '"';
}
} ?>>
<?php if ($missing && in_array('email', $missing)) { ?>
<span class="warning"><font color="red">Please enter your email address</font></span>
<?php } elseif (isset($errors['email'])) { ?>
<span class="warning"><font color="red">Invalid email address</font></span>
<?php } ?>
</p>
<p>
<label for="comments">Comments:
<?php if ($missing && in_array('comments', $missing)) { ?>
<span class="warning"><font color="red">Please enter your comments</font></span>
<?php } ?>
<br /></label>
<textarea name="comments" id="comments" cols="60" rows="8"><?php
if ($missing || $errors) {
if(isset($comments)){
echo htmlentities($comments, ENT_COMPAT, 'UTF-8');
}
} ?></textarea>
</p>
<script type="text/javascript">
var RecaptchaOptions = {
theme : 'white'
};
</script>
<?php
//Display the error message if the values don't match.
if (isset($errors['recaptcha'])) { ?>
<p><font color="red">The values didn't match. Try again.</font></p>
<?php } ?>
<?php echo recaptcha_get_html($public_key); ?>
<p>
<input name="send" id="send" type="submit" value="Send message" />
</p>
</form>