Recaptcha - Form Customization

前端 未结 4 1446
余生分开走
余生分开走 2021-02-14 03:22

Does anyone know if recaptcha can be fully customize without the default frame. I need the recaptcha image to only be a certain width as well as the input field. Has anyone done

4条回答
  •  傲寒
    傲寒 (楼主)
    2021-02-14 03:49

    You can specify custom markup using the 'custom' theme option by including something like this on your page:

    
    

    You then create a div on the page to match the custom_theme_widget id like this:

    The image will be inserted into the recaptcha_image div, so you could limit its width using CSS like this:

    #recaptcha_image img {
        width: 200px;
    }
    

    ...but keep in mind that it will resize the larger image in the browser and may cause the captcha to become unreadable, so I wouldn't necessarily recommend that. The recaptcha_response_field input could also be styled however you like.

    See the "Look and Feel Customization" section here for more examples of what you can (and should) do in a custom theme.

提交回复
热议问题