Please Note: This is only advised for users who are using a third party tracking system that requires a unique button class on your form node.

Introduction

Some third party require a specific button class to triggers and track a certain node.

Since Leadshook would have the same classes for each Form Node button, then you will need a unique class to trigger your third party tracker.

This guide shows you how to add a class to the default Form Node Buttons.

Step by Step Guide:

1.) Add an Identifier on your form node

    2.) Copy the script below and add it to the script section of your form node.

    <script>
      console.log('Class added successfully')
        var form = document.querySelector('[data-identifier="YOUR_FORM_IDENTIFIER_HERE"] .node-form');
        if (form) {
            form.classList.add("YOUR_NEW_CLASS_HERE");
        }
    
    </script>

    3.) Change the part of the code where it says YOUR_FORM_IDENTIFIER_HERE to match with the form identifier you used from Step #1.

    4.) Change the part o the code where it says YOUR_NEW_CLASS_HERE to the new class you want to add to the submit button.

    5.) Save the node and republish the Decision Tree and test.