Pulling page title into hidden form field

Hey everyone, I’ve used the solution to pull the page URL into a hidden form field on various sites without problems:

<script type="text/javascript">
{document.getElementById('pageurl').value = window.location.href;}


<input type="hidden" id="pageurl"  name="Form-location" value="pageurl" />

But I’m having difficulty working out the identifier for value of the “page-title” to replace window.location.href,

:slight_smile: Please advise.