Hidden Element (Forms) - Campaign_source example
by support_tint
HTML
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
</head>
<body>
<!-- Asynchronously load the Tint script -->
<script async src="https://www.tintup.com/app/dist/tint.js"></script>
<script>
// Create a new div element to hold the Tint form
const tintForm = document.createElement('div');
// Set the teamId attribute to your team's ID
tintForm.dataset.teamId = 374768; // Paste your teamID here
// Set the formId attribute to your form's ID
tintForm.dataset.formId = 1765; // Paste your form ID here
// Set the formValues attribute with the Campaign Source value
// Note: Replace 'CAMPAIGN_SOURCE' with the actual campaign source value passed from your code
tintForm.dataset.formValues = (new URLSearchParams({ campaign_source: 'CAMPAIGN_SOURCE' })).toString();
// Append the newly created div after the current script
document.currentScript.after(tintForm);
</script>
</body>
</html>