Created
November 14, 2024 23:53
-
-
Save g-maclean/5c9cff3a107b9a37ddf00039bf790647 to your computer and use it in GitHub Desktop.
PropertyHive - regal rentals viewing form
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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