Set Up ActiveProspect TrustedForm Consent Tracking in Sparkforge
TrustedForm consent tracking attaches a verifiable cert URL to every Sparkforge form submission. You add a hidden custom field, paste the TrustedForm script into an HTML block, and use Custom CSS to hide the field from view.
ActiveProspect TrustedForm captures verifiable consent on every form submission — useful for any business making outbound calls or texts to leads who filled out a form. Here is the setup inside Sparkforge.
Step-by-step setup
- Build your form normally in Marketing > Form Builder.
- Add a Custom Short Text field named exactly
xxTrustedFormCertUrl. Drag it above the submit button. - Save the form. Click Integrate Form, open the Link tab, copy the form URL, and open it in a new browser tab.
- Drag an HTML field into the form just below the submit button. Click Edit Script and paste the Custom Script below — but don't save yet.
- Switch to the form preview tab. Right-click and choose Inspect. Use the element selector to click the
xxTrustedFormCertUrlfield and copy its ID. - Back in the script editor, replace both instances of
FORMIDwith the ID you copied. Save. - Open the Styles tab and paste the Custom CSS below. Update the number in
nth-child(n)to match the position of the cert URL field in your form. - Save the form.
Custom CSS
For forms:
.form-field-wrapper:nth-child(n) {
display: none;
}For surveys:
.slide-no-SlideNumber .form-field-wrapper:nth-child(n) {
display: none;
}SlideNumber is a placeholder — replace it with the actual slide number. n is a placeholder for the field position you want to hide. Always place xxTrustedFormCertUrl above any other hidden field on the same slide.
Example: if the cert URL field sits on slide 2 in the 4th position:
.slide-no-2 .form-field-wrapper:nth-child(4) {
display: none;
}Custom Script
<script type="text/javascript">
(function() {
var field = 'xxTrustedFormCertUrl';
var provideReferrer = false;
var invertFieldSensitivity = false;
var tf = document.createElement('script');
tf.type = 'text/javascript'; tf.async = true;
tf.src = 'http' + ('https:' == document.location.protocol ? 's' : '') +
'://api.trustedform.com/trustedform.js?provide_referrer=' + escape(provideReferrer) +
'&field=' + escape(field) + '&l=' + new Date().getTime() + Math.random() +
'&invert_field_sensitivity=' + invertFieldSensitivity;
var s = document.getElementsByTagName('script')[0];
s.parentNode.insertBefore(tf, s);
})();
function trustedFormCertUrlCallback(certificateUrl) {
document.getElementsByName('FORMID')[0].value = certificateUrl;
document.getElementsByName('FORMID')[0].dispatchEvent(new Event("input"));
}
</script>
<noscript>
<img src="http://api.trustedform.com/ns.gif" />
</noscript>
Frequently Asked Questions
Why do I need TrustedForm with my Sparkforge forms?
Where do I find the field ID to put in the script?
Does this work on Sparkforge surveys too?
Was this article helpful?
Thanks for the feedback.