I have this setting at the moment:
WordPress site, I use something similar to http://barbajs.org/ Therefore, each page content is loaded via ajax into the <main></main> .
On one of the pages (contact page) I have a gravitational form and a page break is used. The form is formed in stages and each step is loaded inside the page. Everything works if the first page that I load is the page (contact page), but as soon as I go to another page and return, or if I go to the contact page from the previous page, the form no longer works.
Any ideas on how to fix this. This is part of the code:
Wordpress: WYSIWYG Short Code
[gravityform id="2" title="false" description="false" ajax="true"]
In boot mode, I have the following: jQuery('#gform_wrapper_2').show() (This is the only thing that works), so I am not getting a black page.
If I click on the next step (it does not load the next step), and I tried this: I found this in the documentation or in the next button in onclick = "..."
jQuery(document).trigger('gform_post_conditional_logic', [2, null, true]) jQuery(document).bind('gform_post_conditional_logic', function(event, formId, fields, isInit){} ) jQuery(document).trigger('gform_post_render', [2, 1]) jQuery("#gform_target_page_number_2").val("2"); jQuery("#gform_2").trigger("submit",[true]);
I need something like gform.init() ideally: D or something similar, which allows me to bind the form again.
Thanks a lot!