This is the field that I want to get prefilled by the current page's url
<input type="url" class="form-control" name="inv" id="inv" placeholder="Referrer's Link" size="100" />
Anyone with any idea please show me how
I am aware of the javascript code
document.getElementById('inv').value = window.location.href;
The problem is that I dont understand how to implement it