Call Wordpress page title as a hidden field on Submit

We have a form that is used on multiple posts and I would like the wordpress page title or url to be listed on submit so that our follow up team knows which page the form was subitted from. Is there a way to do this? I’ve created a hidden field named “source_url” I don’t believe the site uses JQuery. I’ve tried the function:

onFormReady: function($form) {
$(‘input[name=“source_url”]’).val(window.location.href).change();
}

But it’s only calling a blank field for source_url

@Anton could you lend a hand here?

@EAdcock , are you getting an error in your console indicating $ is not defined or something? That would indicate JQuery is not loaded or at least not loaded before the form

Thanks Dennis,

I figured it out. JQuery is active on our site, but the way Wordpress activates JQuery interferes with the function as I had it. Using the find.$form method instead fixed the error