Skip to content

Instantly share code, notes, and snippets.

@g-maclean
Created November 14, 2024 23:53
Show Gist options
  • Select an option

  • Save g-maclean/5c9cff3a107b9a37ddf00039bf790647 to your computer and use it in GitHub Desktop.

Select an option

Save g-maclean/5c9cff3a107b9a37ddf00039bf790647 to your computer and use it in GitHub Desktop.
PropertyHive - regal rentals viewing form
function rr_viewing_shortcode() {
global $property;
$ref = $property->reference_number;
$address = $property->address_name_number;
ob_start();
?>
<div data-paperform-id="regal-rentals-viewing-request-form" data-prefill="Ref=<?php echo $ref;?>&Address=<?php echo $address;?>"></div>
<script>
(function() {
var script = document.createElement('script');
script.src = "https://paperform.co/__embed.min.js";
document.body.appendChild(script);
})()
</script>
<?php
return ob_get_clean();
}
add_shortcode('rr_viewing_form', 'rr_viewing_shortcode');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment