• Resolved synthtony

    (@synthtony)


    I wish to be able to provide conditional show/hide scripting in a CF7 form so that when a user selects an option in a field, hidden sub-options can be called. I have been able to do this using Fancybox and calling the CF7 form from a page but I cannot get this to work just using the EM shortcode.
    First off, here is a link to the methodology that has worked for me and others in the past: http://ww.wp.xz.cn/support/topic/plugin-contact-form-7-this-is-how-to-showhide-fields-with-jquery?replies=44
    Please note that the scripting needs to call the following code:
    <!– Add jquery script to support Conditional Forms–>
    <script type=”text/javascript” src=”<?php echo get_stylesheet_directory_uri(); ?>/js/1.7.1/jquery-1.7.1.min.js”></script>
    <script type=”text/javascript” src=”<?php echo get_stylesheet_directory_uri(); ?>/js/hidefieldsScript.js”></script>

    where this code is placed in the header.php file. It also works when it is in the footer.php file.

    When I try this with EM though, it does not allow the modal to open let alone allow the show/hide script to function.
    Do you have a suggestion or an alternate method which will allow me to make this work?
    I am sure this is something that would be of great benefit to others.
    Thanks again in advance.

    http://ww.wp.xz.cn/plugins/easy-modal/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Daniel Iser

    (@danieliser)

    I believe this too will be solved with v1.2. I have changed how modals get loaded. Previously modals were loaded entirely via AJAX after page load. This is the cause of your JS issues as well as many others. Also the reason that not all shortcodes will work.

    v1.2 Solved this by preloading all the modals before the /body tag on initial page load before document becomes .ready(). This fixes most issues as the modals and content are on the page before your js is activated.

    The fix otherwise would be that you would need to use either .live() or .on() for your events so that they work when new content is added.

    Hope this helps.

    Plugin Author Daniel Iser

    (@danieliser)

    This should be solved with v1.2. If it persists please open a new thread.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Integrating jQuery Show/hide Script’ is closed to new replies.