How do you set the badge position with reCAPTCHA v3?

前端 未结 6 1326
长发绾君心
长发绾君心 2020-12-29 05:05

I would like to use an inline badge with v3, but there is no documentation on badge position for v3.

6条回答
  •  我在风中等你
    2020-12-29 05:29

    You can make the badge inline in V3 with just Javascript it's just not documented yet.


    Set your render parameter to explicit and add a onload parameter for the callback, onRecaptchaLoadCallback for example.

    
    

    Then set up your callback like so and don't forget to enter the id/DOM node of where you want your badge to go, in this case, the id is inline-badge.

    
    

    Example

    Source

    Note: Valid values for 'badge' are 'inline', 'bottomleft', 'bottomright', and 'bottom'. 'bottom' and 'bottomright' are synonyms.

提交回复
热议问题