data-rownd-sign-in-trigger
<a>
or <button>
) to trigger the Rownd
authentication modal when not signed in.
Example:
data-rownd-authenticated-text="<text>"
When the user is authenticated, the text in this attribute will replace the
element’s original text.
Example:
data-rownd-authenticated-redirect-url="<url>"
When the user is authenticated, the clicked element will navigate the browser to
the specified absolute or relative URL. If not specified in the case of an <a>
tag, the href
attribute from the tag will be used instead.
Example:
data-rownd-request-sign-in
/ data-rownd-require-sign-in
When one of these attributes is present on any DOM element, the Rownd sign-in
modal will automatically display if the user is not currently signed in.
The only difference between the two is that data-rownd-request-sign-in
will
display a closable sign-in modal (i.e., with a close icon showing) whereas
data-rownd-require-sign-in
will display a persistent, non-closable modal until
the user successfully completes the sign-in process.
Pre-set the user’s email address or phone number
If you already know the current visitor’s sign-in identifier (i.e., email or
phone), Rownd can pre-populate that into the sign-in modal. Simply add the
following additional attribute to the same element where the request/require
sign-in attribute is present:
data-rownd-default-user-identifier="REPLACE_WITH_EMAIL_OR_PHONE"
Here’s a complete example:
data-rownd-field-interpolate
Replaces templated strings within the element’s HTML content with the values
from the currently signed-in user’s profile.
Example:
data-rownd-field-mapping="<field name>"
Examples:
img
element
and the field name corresponds to a field of type “image”. Example: