{"id":7424,"date":"2024-07-04T16:14:56","date_gmt":"2024-07-04T16:14:56","guid":{"rendered":"https:\/\/www.leadshook.com\/help\/?p=7424"},"modified":"2024-07-04T16:25:03","modified_gmt":"2024-07-04T16:25:03","slug":"how-to-assign-your-own-class-to-form-node-buttons","status":"publish","type":"post","link":"https:\/\/www.leadshook.com\/help\/how-to-assign-your-own-class-to-form-node-buttons\/","title":{"rendered":"How to assign your own class to Form Node Buttons"},"content":{"rendered":"\n<p class=\"has-luminous-vivid-amber-background-color has-background has-medium-font-size\"><strong>Please Note:<\/strong> This is only advised for users who are using a third party tracking system that requires a unique button class on your form node.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Introduction<\/h2>\n\n\n\n<p>Some third party require a specific button class to triggers and track a certain node.<br><br>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.<br><br>This guide shows you how to add a class to the default Form Node Buttons.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Step by Step Guide:<\/h2>\n\n\n\n<p><strong>1.)<\/strong> Add an Identifier on your form node<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img fetchpriority=\"high\" decoding=\"async\" width=\"788\" height=\"490\" src=\"https:\/\/www.leadshook.com\/help\/wp-content\/uploads\/2024\/07\/image-1.png\" alt=\"\" class=\"wp-image-7427\" srcset=\"https:\/\/www.leadshook.com\/help\/wp-content\/uploads\/2024\/07\/image-1.png 788w, https:\/\/www.leadshook.com\/help\/wp-content\/uploads\/2024\/07\/image-1-300x187.png 300w, https:\/\/www.leadshook.com\/help\/wp-content\/uploads\/2024\/07\/image-1-768x478.png 768w, https:\/\/www.leadshook.com\/help\/wp-content\/uploads\/2024\/07\/image-1-60x37.png 60w, https:\/\/www.leadshook.com\/help\/wp-content\/uploads\/2024\/07\/image-1-150x93.png 150w\" sizes=\"(max-width: 788px) 100vw, 788px\" \/><\/figure>\n\n\n\n<ol class=\"wp-block-list\"><\/ol>\n\n\n\n<p><strong>2.)<\/strong> Copy the script below and add it to the script section of your form node.<br><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;script>\n  console.log('Class added successfully')\n    var form = document.querySelector('&#91;data-identifier=\"<strong>YOUR_FORM_IDENTIFIER_HERE<\/strong>\"] .node-form');\n    if (form) {\n        form.classList.add(\"<strong>YOUR_NEW_CLASS_HERE<\/strong>\");\n    }\n\n&lt;\/script><\/code><\/pre>\n\n\n\n<p><strong>3.)<\/strong> Change the part of the code where it says YOUR_FORM_IDENTIFIER_HERE to match with the form identifier you used from Step #1.<br><br><strong>4.)<\/strong> 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.<br><br><strong>5.)<\/strong> Save the node and republish the Decision Tree and test.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>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 [&hellip;]<\/p>\n","protected":false},"author":18,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[27,12,620],"tags":[1027,1028,950],"class_list":["post-7424","post","type-post","status-publish","format-standard","hentry","category-decision-tree","category-leadshook","category-scripts","tag-adding-button-class","tag-class","tag-custom-scripts"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.4 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>How to assign your own class to Form Node Buttons - LeadsHook Knowledge Base<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.leadshook.com\/help\/how-to-assign-your-own-class-to-form-node-buttons\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to assign your own class to Form Node Buttons - LeadsHook Knowledge Base\" \/>\n<meta property=\"og:description\" content=\"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 [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.leadshook.com\/help\/how-to-assign-your-own-class-to-form-node-buttons\/\" \/>\n<meta property=\"og:site_name\" content=\"LeadsHook Knowledge Base\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/leadshook\/\" \/>\n<meta property=\"article:published_time\" content=\"2024-07-04T16:14:56+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-07-04T16:25:03+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.leadshook.com\/help\/wp-content\/uploads\/2024\/07\/image-1.png\" \/>\n<meta name=\"author\" content=\"Sheetal\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@leadshook\" \/>\n<meta name=\"twitter:site\" content=\"@leadshook\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Sheetal\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.leadshook.com\\\/help\\\/how-to-assign-your-own-class-to-form-node-buttons\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.leadshook.com\\\/help\\\/how-to-assign-your-own-class-to-form-node-buttons\\\/\"},\"author\":{\"name\":\"Sheetal\",\"@id\":\"https:\\\/\\\/www.leadshook.com\\\/help\\\/#\\\/schema\\\/person\\\/5139261061a0c92dc7aa58dcd033094c\"},\"headline\":\"How to assign your own class to Form Node Buttons\",\"datePublished\":\"2024-07-04T16:14:56+00:00\",\"dateModified\":\"2024-07-04T16:25:03+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.leadshook.com\\\/help\\\/how-to-assign-your-own-class-to-form-node-buttons\\\/\"},\"wordCount\":176,\"publisher\":{\"@id\":\"https:\\\/\\\/www.leadshook.com\\\/help\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/www.leadshook.com\\\/help\\\/how-to-assign-your-own-class-to-form-node-buttons\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.leadshook.com\\\/help\\\/wp-content\\\/uploads\\\/2024\\\/07\\\/image-1.png\",\"keywords\":[\"adding button class\",\"class\",\"custom scripts\"],\"articleSection\":[\"Decision Tree\",\"LeadsHook\",\"Scripts\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.leadshook.com\\\/help\\\/how-to-assign-your-own-class-to-form-node-buttons\\\/\",\"url\":\"https:\\\/\\\/www.leadshook.com\\\/help\\\/how-to-assign-your-own-class-to-form-node-buttons\\\/\",\"name\":\"How to assign your own class to Form Node Buttons - LeadsHook Knowledge Base\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.leadshook.com\\\/help\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.leadshook.com\\\/help\\\/how-to-assign-your-own-class-to-form-node-buttons\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.leadshook.com\\\/help\\\/how-to-assign-your-own-class-to-form-node-buttons\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.leadshook.com\\\/help\\\/wp-content\\\/uploads\\\/2024\\\/07\\\/image-1.png\",\"datePublished\":\"2024-07-04T16:14:56+00:00\",\"dateModified\":\"2024-07-04T16:25:03+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.leadshook.com\\\/help\\\/how-to-assign-your-own-class-to-form-node-buttons\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.leadshook.com\\\/help\\\/how-to-assign-your-own-class-to-form-node-buttons\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.leadshook.com\\\/help\\\/how-to-assign-your-own-class-to-form-node-buttons\\\/#primaryimage\",\"url\":\"https:\\\/\\\/www.leadshook.com\\\/help\\\/wp-content\\\/uploads\\\/2024\\\/07\\\/image-1.png\",\"contentUrl\":\"https:\\\/\\\/www.leadshook.com\\\/help\\\/wp-content\\\/uploads\\\/2024\\\/07\\\/image-1.png\",\"width\":788,\"height\":490},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.leadshook.com\\\/help\\\/how-to-assign-your-own-class-to-form-node-buttons\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.leadshook.com\\\/help\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to assign your own class to Form Node Buttons\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.leadshook.com\\\/help\\\/#website\",\"url\":\"https:\\\/\\\/www.leadshook.com\\\/help\\\/\",\"name\":\"LeadsHook Knowledge Base\",\"description\":\"LeadsHook Training &amp; Technical Help\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.leadshook.com\\\/help\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.leadshook.com\\\/help\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.leadshook.com\\\/help\\\/#organization\",\"name\":\"LeadsHook\",\"url\":\"https:\\\/\\\/www.leadshook.com\\\/help\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.leadshook.com\\\/help\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.leadshook.com\\\/help\\\/wp-content\\\/uploads\\\/2018\\\/12\\\/leadshook-logo.png\",\"contentUrl\":\"https:\\\/\\\/www.leadshook.com\\\/help\\\/wp-content\\\/uploads\\\/2018\\\/12\\\/leadshook-logo.png\",\"width\":350,\"height\":83,\"caption\":\"LeadsHook\"},\"image\":{\"@id\":\"https:\\\/\\\/www.leadshook.com\\\/help\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/leadshook\\\/\",\"https:\\\/\\\/x.com\\\/leadshook\",\"https:\\\/\\\/www.linkedin.com\\\/showcase\\\/leadshook\\\/\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.leadshook.com\\\/help\\\/#\\\/schema\\\/person\\\/5139261061a0c92dc7aa58dcd033094c\",\"name\":\"Sheetal\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/b0b84df264435d13d938835e002bc75bb86f34919c86bf0ab1f2cbfb7dc02e45?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/b0b84df264435d13d938835e002bc75bb86f34919c86bf0ab1f2cbfb7dc02e45?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/b0b84df264435d13d938835e002bc75bb86f34919c86bf0ab1f2cbfb7dc02e45?s=96&d=mm&r=g\",\"caption\":\"Sheetal\"},\"url\":\"https:\\\/\\\/www.leadshook.com\\\/help\\\/author\\\/sheetal\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to assign your own class to Form Node Buttons - LeadsHook Knowledge Base","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.leadshook.com\/help\/how-to-assign-your-own-class-to-form-node-buttons\/","og_locale":"en_US","og_type":"article","og_title":"How to assign your own class to Form Node Buttons - LeadsHook Knowledge Base","og_description":"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 [&hellip;]","og_url":"https:\/\/www.leadshook.com\/help\/how-to-assign-your-own-class-to-form-node-buttons\/","og_site_name":"LeadsHook Knowledge Base","article_publisher":"https:\/\/www.facebook.com\/leadshook\/","article_published_time":"2024-07-04T16:14:56+00:00","article_modified_time":"2024-07-04T16:25:03+00:00","og_image":[{"url":"https:\/\/www.leadshook.com\/help\/wp-content\/uploads\/2024\/07\/image-1.png","type":"","width":"","height":""}],"author":"Sheetal","twitter_card":"summary_large_image","twitter_creator":"@leadshook","twitter_site":"@leadshook","twitter_misc":{"Written by":"Sheetal","Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.leadshook.com\/help\/how-to-assign-your-own-class-to-form-node-buttons\/#article","isPartOf":{"@id":"https:\/\/www.leadshook.com\/help\/how-to-assign-your-own-class-to-form-node-buttons\/"},"author":{"name":"Sheetal","@id":"https:\/\/www.leadshook.com\/help\/#\/schema\/person\/5139261061a0c92dc7aa58dcd033094c"},"headline":"How to assign your own class to Form Node Buttons","datePublished":"2024-07-04T16:14:56+00:00","dateModified":"2024-07-04T16:25:03+00:00","mainEntityOfPage":{"@id":"https:\/\/www.leadshook.com\/help\/how-to-assign-your-own-class-to-form-node-buttons\/"},"wordCount":176,"publisher":{"@id":"https:\/\/www.leadshook.com\/help\/#organization"},"image":{"@id":"https:\/\/www.leadshook.com\/help\/how-to-assign-your-own-class-to-form-node-buttons\/#primaryimage"},"thumbnailUrl":"https:\/\/www.leadshook.com\/help\/wp-content\/uploads\/2024\/07\/image-1.png","keywords":["adding button class","class","custom scripts"],"articleSection":["Decision Tree","LeadsHook","Scripts"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/www.leadshook.com\/help\/how-to-assign-your-own-class-to-form-node-buttons\/","url":"https:\/\/www.leadshook.com\/help\/how-to-assign-your-own-class-to-form-node-buttons\/","name":"How to assign your own class to Form Node Buttons - LeadsHook Knowledge Base","isPartOf":{"@id":"https:\/\/www.leadshook.com\/help\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.leadshook.com\/help\/how-to-assign-your-own-class-to-form-node-buttons\/#primaryimage"},"image":{"@id":"https:\/\/www.leadshook.com\/help\/how-to-assign-your-own-class-to-form-node-buttons\/#primaryimage"},"thumbnailUrl":"https:\/\/www.leadshook.com\/help\/wp-content\/uploads\/2024\/07\/image-1.png","datePublished":"2024-07-04T16:14:56+00:00","dateModified":"2024-07-04T16:25:03+00:00","breadcrumb":{"@id":"https:\/\/www.leadshook.com\/help\/how-to-assign-your-own-class-to-form-node-buttons\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.leadshook.com\/help\/how-to-assign-your-own-class-to-form-node-buttons\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.leadshook.com\/help\/how-to-assign-your-own-class-to-form-node-buttons\/#primaryimage","url":"https:\/\/www.leadshook.com\/help\/wp-content\/uploads\/2024\/07\/image-1.png","contentUrl":"https:\/\/www.leadshook.com\/help\/wp-content\/uploads\/2024\/07\/image-1.png","width":788,"height":490},{"@type":"BreadcrumbList","@id":"https:\/\/www.leadshook.com\/help\/how-to-assign-your-own-class-to-form-node-buttons\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.leadshook.com\/help\/"},{"@type":"ListItem","position":2,"name":"How to assign your own class to Form Node Buttons"}]},{"@type":"WebSite","@id":"https:\/\/www.leadshook.com\/help\/#website","url":"https:\/\/www.leadshook.com\/help\/","name":"LeadsHook Knowledge Base","description":"LeadsHook Training &amp; Technical Help","publisher":{"@id":"https:\/\/www.leadshook.com\/help\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.leadshook.com\/help\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.leadshook.com\/help\/#organization","name":"LeadsHook","url":"https:\/\/www.leadshook.com\/help\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.leadshook.com\/help\/#\/schema\/logo\/image\/","url":"https:\/\/www.leadshook.com\/help\/wp-content\/uploads\/2018\/12\/leadshook-logo.png","contentUrl":"https:\/\/www.leadshook.com\/help\/wp-content\/uploads\/2018\/12\/leadshook-logo.png","width":350,"height":83,"caption":"LeadsHook"},"image":{"@id":"https:\/\/www.leadshook.com\/help\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/leadshook\/","https:\/\/x.com\/leadshook","https:\/\/www.linkedin.com\/showcase\/leadshook\/"]},{"@type":"Person","@id":"https:\/\/www.leadshook.com\/help\/#\/schema\/person\/5139261061a0c92dc7aa58dcd033094c","name":"Sheetal","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/b0b84df264435d13d938835e002bc75bb86f34919c86bf0ab1f2cbfb7dc02e45?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/b0b84df264435d13d938835e002bc75bb86f34919c86bf0ab1f2cbfb7dc02e45?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/b0b84df264435d13d938835e002bc75bb86f34919c86bf0ab1f2cbfb7dc02e45?s=96&d=mm&r=g","caption":"Sheetal"},"url":"https:\/\/www.leadshook.com\/help\/author\/sheetal\/"}]}},"_links":{"self":[{"href":"https:\/\/www.leadshook.com\/help\/wp-json\/wp\/v2\/posts\/7424","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.leadshook.com\/help\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.leadshook.com\/help\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.leadshook.com\/help\/wp-json\/wp\/v2\/users\/18"}],"replies":[{"embeddable":true,"href":"https:\/\/www.leadshook.com\/help\/wp-json\/wp\/v2\/comments?post=7424"}],"version-history":[{"count":4,"href":"https:\/\/www.leadshook.com\/help\/wp-json\/wp\/v2\/posts\/7424\/revisions"}],"predecessor-version":[{"id":7432,"href":"https:\/\/www.leadshook.com\/help\/wp-json\/wp\/v2\/posts\/7424\/revisions\/7432"}],"wp:attachment":[{"href":"https:\/\/www.leadshook.com\/help\/wp-json\/wp\/v2\/media?parent=7424"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.leadshook.com\/help\/wp-json\/wp\/v2\/categories?post=7424"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.leadshook.com\/help\/wp-json\/wp\/v2\/tags?post=7424"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}