It is resolved – thank you!
I was able to figure this out on my own! I’ve posted my code below.
The catch is that this filter will run against every field on every form, and the only thing the filter “knows” about the field is its default value.
So in order to get this to work, you need to fill your form field with a default value that you’ll check in the filter – I used “currenturl”.
// Pre-populate the rurl of all forms with the current page's URL add_filter('dhvc_form_hidden_default_value','ifg_populate_rurl',10,1); function ifg_populate_rurl($default_value) { // We can't limit this to a field by name or ID, so we need to use a placeholder. // Add "currenturl" to an rurl field to trigger the replacement. if ($default_value == "currenturl" ) { $default_value = "http://" . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'] . "?status=thank-you"; } return $default_value; }