Skip to content

Instantly share code, notes, and snippets.

View angiejones's full-sized avatar

Angie Jones angiejones

View GitHub Profile
marklchaves / avada_forms_hidden_field_set_doc_url.php
Last active June 20, 2022 18:40
Add document.url as a hidden field
<?php // Ignore this first line when copying to your child theme's functions.php file.
add_action( 'wp_footer', function () { ?>
(function() {
if (document.title !== "Test Form – Avada Lab") return; // Run this script on the test form page only.
try {
document.querySelector("#doc-url").setAttribute("value", document.URL);
} catch (e) {