• Resolved bonniee29

    (@bonniee29)


    Hello,

    I have a gallery list of 184 items. I would like to add a pop up to each with a form the auto populated the title of the item that was clicked. I can do this with pop up maker and gravity forms, but the pop up disables the data being sent to auto populate the form. Can you help me find a way around this? thank you!!

Viewing 6 replies - 1 through 6 (of 6 total)
  • @bonniee29

    I’ll have our Lead Dev @danieliser offer some advice as soon as possible. Thank you for being patient.

    Thread Starter bonniee29

    (@bonniee29)

    Thank you so much!!

    Plugin Author Daniel Iser

    (@danieliser)

    @bonniee29 – First lets clear some assumptions. You assume that the popups content is loaded when you click the link, but rather it is preloaded on the page. IE the form fields are already present before the user clicks a link. Typically your form would detect those link values prior to rendering the form.

    Your best bet will require a bit of custom code to pass the value you want into the form, but is very efficient and works with potentially thousands of links without causing any performance issues.

    So do this:

    Create one popup with one form.
    Set all those links to trigger that one popup.

    Then add this to your site and customize.

    add_action( 'wp_footer', '_custom_popup_scripts', 1000 );
    function _custom_popup_scripts() {
    	?>
    	<script type="text/javascript">
    		(function ($) {
    			$('#pum-123').on('pumAfterOpen', function () {
    				var $popup = PUM.getPopup(this),
    					$field = $popup.find('[name="my_custom_field"]'),
    					$trigger = $($.fn.popmake.last_open_trigger);
    
    				$field.val( $trigger.attr('title') );
    			});
    		}(jQuery));
    	</script>
    	<?php
    }
    Thread Starter bonniee29

    (@bonniee29)

    @danieliser thank you so much, I did assume the pop up loaded that way. I am very excited to implement this code I really appreciate your help!!

    Plugin Author Daniel Iser

    (@danieliser)

    @bonniee29 – Awesome! Happy I could help you out. Btw, If you have a moment, I would very much appreciate if you could quickly click that it Works for you and rate the plugin, just to help us spread the word.

    PS That solution is solid, it should only require looking at the html briefly to change the field name my_custom_field and updating the #pum-123 to match your popup ID#.

    Closing this ticket due to inactivity. If you’re still having an issue, create a new thread, link this one, and we will continue troubleshooting.

    Please take a moment to rate and review our plugin and/or support.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Pop up with Gravity Form Auto Dynamic Population’ is closed to new replies.