Thank you! Your feedback has been delivered
Thank you! Your feedback has been sent

Isotope resizing issue

Hello,

Essential Info: Wordpress 3.5.2 Gravity Forms 1.7.6 Gravity Forms Signature Add-on 1.3 No other plugins

I\'m using a Wordpress theme that makes use of the isotope jQuery plugin. I have a few page templates and everything works fine.

I added a form which uses conditional logic to my full width template. When the conditional logic is activated, additional fields are created, the layout does not expand.

I commented out one of the javascript in my functions.php and the page is all messed but the conditional logic works.

    if( is_blog_page() || is_archive() || is_page_template(\'page-fullwidth.php\') ) { 
    wp_enqueue_script( \'isotopeloadarchive\', get_template_directory_uri() . \'/js/jquery.isotope.archive.load.js\', array(\'jquery\'), false, true  ); 
} 
else {
    wp_enqueue_script( \'isotopeload\', get_template_directory_uri() . \'/js/jquery.isotope.load.js\', array(\'jquery\'), false, true  );
}

The code under the \"else\" tag is the script which is causing my issues. I need this to load so my theme retains its layout but when it does my forms do not show properly.

User Gravatar

davedavedave

Posted Jul 8 2013 17:39 UTC

$10


  • Assigned To NBoychev
  • Solved
  • jquery
    isotope
  • 2266 Views

6 Replies


Hello davedavedave,

I guess that the forms are elements from the isotope. You need to call isotope\'s \'reLayout\' method everytime when the form is changed (by the conditionals).

$(\'isotope container\'s selector goes here\').isotope(\'reLayout\');

Since I can\'t find detailed documentation about the JS events of gravity forms, it will be better if I take a look at the site.

Regards,

Nikola Boychev

User Gravatar

NBoychev

Posted Jul 8 2013 19:08 UTC

Hi Nikola,

Thanks for your reply.

The site is http://goo.gl/dF3A6

Do you require login details?

David

User Gravatar

davedavedave

Posted Jul 8 2013 22:08 UTC

Nikola - you\'re a damn lifesaver, thank you ever so much!

User Gravatar

davedavedave

Posted Jul 8 2013 23:19 UTC

I\'ve worked with David on private messages, and the solution of his problem is:

The isotope\'s positioning need\'s to be refreshed on gravity forms conditional change event:

$(document).on(\'gform_post_conditional_logic\', function(){
    $(\'.isotope\').isotope(\'reLayout\');
});

Regards,

Nikola Boychev

User Gravatar

NBoychev

Posted Jul 10 2013 19:01 UTC

Solution

This didn't solve your task? Get your own custom solution.

Thanks Nikola.

User Gravatar

davedavedave

Posted Jul 10 2013 19:44 UTC

Is it possible to add this reLayout functionality to the multiple field upload of Gravity Forms?

When uploading files the page does not expand as it now does with the reLayout snippet Nikola posted above.

Thanks.

enter image description here

User Gravatar

ddd-h

Posted Apr 15 2014 3:57 UTC

Add a reply

By posting a reply on CodersClan you agree to our Terms & Conditions