How can I make a lightbox form work off a wordpress site?

  • Profile Image
    NOWinMotion
    Asked on October 02, 2012 at 10:52 AM

    I'm moving my site over to wordpress, and I want to keep the few lightbox forms that I currnetly have, however I can't figure out how to get them to work.  I saw nother post that someone figured it out, so I know it can be done.  Unfortunately the person never posted the solution. 

    Thanks very much,
    Josh

  • Profile Image
    NeilVicente
    Answered on October 02, 2012 at 11:08 AM

    Josh,

    Are your lightboxed forms currently embedded on your site? If it used to be, may I ask how you have embedded them? What exactly were your issues with them?

    By default, JotForm produces jQuery-based lightbox embed codes, so we can probably eliminate a jQuery conflict as a possible reason as to why the form malfunctions.

    Can you please try to embed a form now, on a post or a page, so we can inspect and troubleshoot if there are problems?

    We look forward to your quick response. Thanks!

  • Profile Image
    NOWinMotion
    Answered on October 02, 2012 at 11:29 AM

    After doing some more poking around, I think I see the difficulty.  I'm trying to use a custom widget that came with the theme.  The code for the widget is as follows:

                <div class="donation-widget">

                    <?php if ( ! empty( $instance['text'] ) ) :    ?>
                    <div class="donation-widget-text">
                        <?php echo wpautop( $instance['text'] ); ?>
                    </div>
                    <?php endif; ?>
                   
                    <?php
                    $button_url = ! empty( $instance['button_url'] ) && 'http://' != $instance['button_url'] ? $instance['button_url'] : '';
                    if ( $button_url && ! empty( $instance['button_text'] ) ) :
                    ?>
                    <div class="donation-widget-button">
                        <a target="_blank" href="<?php echo esc_url( $button_url ); ?>" class="button"><?php echo esc_html( $instance['button_text'] ); ?></a>
                    </div>
                    <?php endif; ?>

                </div>

    So, when I add the widget to the site, it only gives the location to enter the url, which obviously doesn't work.  However, if I just use the regular code from JotForm and create my own widget using HTML, it works just fine. 

    If you look at the site now, there's a button on the bottom right for Donations - it works perfectly. 

  • Profile Image
    NeilVicente
    Answered on October 02, 2012 at 11:34 AM

    Well, I am glad to hear that you're able to sort this out. It does seem like a better idea to use JotForm's generated embed codes though, rather than incorporating it onto another script or widget. While doing the latter may provide additional functions, it probably is not worth the time needed for troubleshooting.

    In any case, if you need further help from us, please do not hesitate to ask. It is our job to make using JotForm easier that what it already is.

    :)