A simple checkbox

Tech Team
Tech Team
  • Updated

If our widgets are a little too big for you, we have a variation.

By default, we recommend the use of widgets for consent forms. But in some cases, when space is limited or you really want to control the design of your forms, you may prefer to display a classic checkbox. We've got a trick for that!

To display a simple checkbox, you'll need a bit of Javascript code. This code can be added in the same way as you load our Axeptio code snippet. This is necessary because to create this checkbox you'll need to associate it with your marketing data processing identifier.

// initialize the array if not already declared
window._axcb = window._axcb || [];
// add our callback:
window._axcb.push(function(axeptioSDK){
// this part of the code will be called once
// all Axeptio configuration has been downloaded

// And here we'll create the checkbox
axeptioSDK.createConsentCheckbox({
service: 'processings',
identifier: “put here the checkbox identifier”,
node: document.getElementById(“Put here an ID to the element in which the checkbox will be created”),
embed: {
checkboxText: “I accept the privacy policy”,
checkboxDetailsText: “more information”.
}
});
});

Was this article helpful?

0 out of 1 found this helpful