Form ID pulled from CMS data

@thewonglv @LJB

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.

2 Likes