Forums

Sending by email a hidden field

gonzalos 29 Aug, 2015
Hi,

I am trying to complete a hidden field using javascript:

  var elem = document.getElementById("Source");
  elem.value = document.referrer;


Once that occurs I want to send that "Source" which is a hidden field by email.
So far I didn't find a way to do it. I tried to write the javascript in a Load Js field on Load but it doesn't work, maybe it has to run after all the components of the page are loaded.
Any ideas?

Thank you very much
GreyHead 30 Aug, 2015
Hi gonzales,

Please check this post which I think does what you need.

If you have to use JavaScript then you will need to run the code on DOM Ready something like this .
jQuery(document).ready(function (jQ) {
  jQ('#Source').val(document.referrer);
});

Bob
This topic is locked and no more replies can be posted.