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.

Forms in Thickbox

  1. hittheroadjack
    Member

    I tried to put one of my forms into a thickbox, but no success.
    I found out, that I have to enqueue the scripts for the form - done in header.php just before wp_head (). Still no success : the conditional logic does not work at all but I can use simple forms and i.e. upload images from the thickbox form.
    Here is my code:

    <?php if ( is_singular() ) { wp_enqueue_script( 'comment-reply' ); }
    	gravity_form_enqueue_scripts(20, FALSE);
    	gravity_form_enqueue_scripts(21, FALSE);?>
    <?php  wp_head(); ?>
    <?php $theme->hook('head'); ?>

    and

    <input class="thickbox" title="Feld für den Titel" type="button" value="Wartungs-Menü" alt="#TB_inline?height=700&width=400&inlineId=examplePopup1" />
    <!-- </div>-->
    <div id="examplePopup1" style="display: none;">
    <h2>Wartungsmenü</h2>
    <div style="float: left; padding: 10px;"><img src="http://shibashake.com/wordpress-theme/wp-content/uploads/2010/03/bio1.jpg" alt="" width="150" height="168" /></div>
    Erläuterungen für das Wartungsmenü
    			  <?php
    /*			   print do_shortcode('[gravityform id="20" name="Test-Formular attachments"]');*/
    			   gravity_form(20, false, false, false, '', false);
    			   ?>
    			   <strong>Ausserhalb klicken um zu schliessen..</strong></div>

    I am using WP3.3.1 de_DE and GF 1.6.1.
    I can't figure out what's wrong? Can someone help, please?

    Posted 12 years ago on Monday January 16, 2012 | Permalink
  2. Hello Hittheroadjack,

    Is this something you are still attempting to setup? If so, please share a link where the current setup can be previewed and I will take a look. :)

    Posted 12 years ago on Wednesday February 1, 2012 | Permalink
  3. hittheroadjack
    Member

    Yes and no!
    No, in terms of this approach: I used "form lightbox plugin" by myphpmaster.com and this solved above problem.
    Yes in terms of another form I try to setup. The form is more complicated having a tinyMCE-Editor in a textarea activated through a HTML field. This textarea ( and the editor) are non-reactive when showing in form lightbox.
    I am not very sure where the problem is : tinyMCE, GF or form lightbox plugin.
    On the other hand, I am still hoping to get a wp_editor solution for textareas in GF pretty soon. This might solve the whole issue anyway. Any hope?

    Posted 12 years ago on Wednesday February 1, 2012 | Permalink
  4. Hi hittheroadjack,

    Not sure when front end support for wp_editor() will be added to Gravity Forms but it is something we are definitely planning to add.

    Do you have a link where your current setup can be viewed?

    Posted 12 years ago on Thursday February 2, 2012 | Permalink
  5. I am doing this on my site. Try using the Easy FancyBox plugin then set your link up like this example:

    <a title="Contact Us" href="#fancyboxID-1" rel="nofollow">Ask a Question</a>

    Then you need to add this code to page...

    <div style="display:none" class="fancybox-hidden"><div id="fancyboxID-1">[gravityform id="1" ajax="true"]</div></div>

    Of course change your gravity form id number to match your form. You can see an example on my site http://flatfeerealty.com/contact/ then click the button in the left box.

    Here is a link for reference http://websitesetuppro.com/how-to-open-gravity-forms-form-in-a-lightbox/. Hope that helps you out.

    Posted 12 years ago on Sunday February 5, 2012 | Permalink