Support

Account

Home Forums General Issues On click display a popup with fields from page Reply To: On click display a popup with fields from page

  • Hi @fanta00

    You need to load the fields values first and save it in Javascript variables. It should be something like this:

    <script type="text/javascript">
        (function($){
            $( document ).ready(function() {
                var fieldPage_<?php echo $page; ?> = <?php echo get_field( "text_field", $page ); ?>;
            });
        })(jQuery);
    </script>

    You can also use AJAX to load the fields. These pages should give you more idea about it: http://api.jquery.com/jquery.ajax/, https://premium.wpmudev.org/blog/using-ajax-with-wordpress/.

    I hope this helps.