PLEASE NOTE: These forums are no longer utilized and are provided as an archive for informational purposes only. All support issues will be handled via email using our support ticket system. For more detailed information on this change, please see this blog post.

placement of jquery script

  1. I have created a jquery script based on a post here that sets a cieling on the number of checkboxes checked. It functions perfectly in a standard html page. i'm loading it in the wp template script-loader.php and i'm wp_enqueue_script'ing it in display_form.php just after jQuery.
    i get how to call it, but i'm not sure where the below script or part of it should be placed

    Any help would be appreciated. Thanks Kim

    jQuery.noConflict();
        jQuery(document).ready(function($) {
            $(':checkbox[id^=choice_]').limit(2);
        });
    Posted 12 years ago on Tuesday April 17, 2012 | Permalink
  2. Kim, can you post a link to your form. Is display_form.php a page template in your theme?

    Posted 12 years ago on Tuesday April 17, 2012 | Permalink
  3. THis is an a more developed issue, but are there instructions available on how to extend the check box item and allow for settings in form creation widget?

    Posted 12 years ago on Tuesday April 17, 2012 | Permalink
  4. @Rob Harrell the Display_Form contains a class named "GFFormDisplay". i believe that is a GF template. It appears to be used for a few things, but also to conditionally load scripts when necessary.
    the form (my form not the one noted above) can be found here:
    http://iitconf.2techgirls.com/speakers/call-for-speakers/
    if you use firebug you can see the script in
    twotg-limitCheckboxSelections.js

    Posted 12 years ago on Tuesday April 17, 2012 | Permalink
  5. Kim, why don't you place that script above into twotg-limitCheckboxSelections.js ?

    Posted 12 years ago on Wednesday April 18, 2012 | Permalink
  6. Thank you. That did work perfectly and i consider the issue closed.
    `
    Issues to be resolved:
    1. The script is not loaded when the form is called.
    2. a GF developer will need to find the form id and the checkbox id or ul id.

    i'll create a post with an extended instructions for putting it in place and calling it.
    Thanks
    Kim

    Posted 12 years ago on Wednesday April 18, 2012 | Permalink
  7. Right on, glad to help.

    Posted 12 years ago on Wednesday April 18, 2012 | Permalink

This topic has been resolved and has been closed to new replies.