How to capture a website url in the shopify contact form
This question already has an answer here:
create a hidden input
<input type="hidden" value="" id="hiddenurl" name="url"/>
and add javascript:
var a = document.getElementById('hiddenurl');
a.value = window.location.href;
<p><?= htmlentities( $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'] ) ?></p>
链接地址: http://www.djcxy.com/p/42288.html
上一篇: 使用PHP获取URL参数