Webflow.push(function() {
var landingPageId = window.location.href.replace(window.location.origin, "");
if(landingPageId == "/") {
$('#email-form').attr('name', 'Homepage').attr('data-name', 'Homepage');
} else {
$('#email-form').attr('name', window.location.href.replace(window.location.origin, "").replace("/", "")).attr('data-name', window.location.href.replace(window.location.origin, "").replace("/", ""));
}
});
Notice I have #email-form
which is the form ID.