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.

js tooltip not function on subpages on multiform

  1. this is similar to the other issue with multipage, on the subpages...

    we are using js to load an image as a tooltip (need to show a paragraph of text for each option selection - you hover over the option, you see the paragraph text as a tooltip, so you can make the selection you want).

    it's working fine on step 1 of the multiform, but as soon as i go to step 2, it stops working...if i go back to step one with "previous" submit button, or even on the 1st step when we get validation errors on the form it stops working.

    is there a way we can call our js function after each time we click the submit button. i am thinking this might work.

    thank you.

    Posted 13 years ago on Thursday February 17, 2011 | Permalink
  2. There is a jQuery event you can use to accomplish what you want to do. I have forwarded this post to one of the developers on our team who is familiar with this jQuery and he will be posting details on the solution here in the morning.

    Posted 13 years ago on Thursday February 17, 2011 | Permalink
  3. Just following up...can I still get that? Thanks.

    Posted 13 years ago on Thursday February 17, 2011 | Permalink
  4. You will need to use the gform_page_loaded javascript hook. Following is a code snippet on how to use that hook.

    <script type="text/javascript">
        jQuery(document).ready(function(){
    
            jQuery(document).bind('gform_page_loaded', function(event, form_id, page_number){
                   //Replace 2 with your actual form ID
                   if(form_id == 2){
                       //Add your tooltip javascript code here
                   }
            });
    
        })
    </script>
    Posted 13 years ago on Thursday February 17, 2011 | Permalink
  5. thanks. very does this snippet go? i tried to get it to just fire an alert, but nothing.

    Posted 13 years ago on Friday February 18, 2011 | Permalink
  6. You should add it to your theme's header file. If your theme has a custom.js or init.js, you could add it there as well.

    I assumed your form had AJAX enabled, and this script will only work for AJAX forms. Is your form a non-AJAX form?

    Posted 13 years ago on Friday February 18, 2011 | Permalink
  7. yes, ajax...i think i got it to work. i am going to try a few things and give the final verdict! :)

    thanks again!!!

    Posted 13 years ago on Friday February 18, 2011 | Permalink
  8. joshuakons
    Member

    I am trying to insert the below snippet of code to prevent AJAX from breaking my Cufon fonts when I use multi-form pages. I have tried everything, but cannot figure out where to insert this code or how to make it function. I have inserted it directly in header.php in several locations to no avail. Can someone help me with this? The code I am trying to insert is below:

    <script type="text/javascript">
    2 jQuery(document).ready(function(){
    3
    4 jQuery(document).bind('gform_page_loaded', function(){
    5 Cufon.refresh('h1,h2,h3,h4,h5,h6');
    6 });
    7
    8 })
    9 </script>

    Posted 12 years ago on Sunday January 29, 2012 | Permalink