{"id":9774856,"date":"2017-12-12T12:47:20","date_gmt":"2017-12-12T12:47:20","guid":{"rendered":"https:\/\/wordpress.org\/support\/topic\/hidden-url-2\/"},"modified":"2017-12-12T12:47:20","modified_gmt":"2017-12-12T12:47:20","slug":"hidden-url-2","status":"publish","type":"topic","link":"https:\/\/wordpress.org\/support\/topic\/hidden-url-2\/","title":{"rendered":"hidden URL"},"content":{"rendered":"<p>Hi guys,<\/p>\n<p>I&#8217;m using same the same form in multiple pages and I&#8217;d like to pass page URL via hidden field so that we can track where on our site people fill in the form.<\/p>\n<p>I tried to add this code in the &#8220;edit javascript&#8221; -part:<\/p>\n<p>document.getElementById(&#8220;hidden-element-id-from-the-form&#8221;).value=document.location.href;<\/p>\n<p>Unfortunately, this breaks the form and the submit button doesn&#8217;t work after this mod.<\/p>\n<p>Would you be able to help me out with this?<\/p>\n","protected":false},"template":"","class_list":["post-9774856","topic","type-topic","status-publish","hentry"],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/9774856","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic"}],"about":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/types\/topic"}],"version-history":[{"count":0,"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/9774856\/revisions"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/media?parent=9774856"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}