Specifying the mode for widget type

It seems that some documentation is missing on the mode of the widget. This page describes 3 widget type modes. However, in this section the mode option is not listed.

After some digging in api.js it seems that data-mode is not processed, so I guess that this option isn’t available for implicit rendered widgets. Some parts of the code do process the mode attribute, so probably it’s available for explicitly rendered widgets?

Something went wrong with the links, another attempt:

This page: https://developers.cloudflare.com/turnstile/reference/widget-types
This section: https://developers.cloudflare.com/turnstile/get-started/client-side-rendering/#configurations

What you are seeing is expected: the type/mode is configured in the dashboard, not with the JavaScript API. If you want to use different modes, you will need to create multiple widgets.

2 Likes

Ah, that clarifies! Thanks :).

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.