Home Features Download v18.5 Child theme GGitHub

CF7

HomeFeaturesCF7

If you want to include the current URL inside a CF7 form, use this tag: [hidden current-url default:get] inside the FORM tab and then inside the MAIL tab add this: <a href="[current-url]">Product</a>.

This is the JS that runs in the background:

document.addEventListener('DOMContentLoaded', function () {
  var currentUrl = window.location.href;
  var currentUrlInput = document.querySelector('input[name="current-url"]');
  if (currentUrlInput) {
    currentUrlInput.value = currentUrl;
  }
});
🦁 Gridy