Skip to content

ConsentForm

The ConsentForm class represents a consent form loaded via UserMessagingPlatform. Display it to the user to obtain or update privacy consent.

Methods

show / Show

Presents the consent form to the user. The callback is invoked when the form is dismissed.

func show(on_consent_form_dismissed := func(form_error: FormError): pass) -> void

Usage:

consent_form.show(
    func(form_error: FormError):
        if form_error:
            print("Consent form dismissed with error: ", form_error.message)
        else:
            print("Consent form completed successfully")
)

public void Show(Action<FormError> onConsentFormDismissed = null)

Usage:

consentForm.Show(
    (formError) => {
        if (formError != null)
            GD.Print("Consent form dismissed with error: " + formError.Message);
        else
            GD.Print("Consent form completed successfully");
    }
);