What is JotForm?
JotForm is a free online form builder which helps you create online forms without writing a single line of code. No sign-up required.

At JotForm, we want to make sure that you’re getting the online form builder help that you need. Our friendly customer support team is available 24/7.

We believe that if one user has a question, there could be more users who may have the same question. This is why many of our support forum threads are public and available to be searched and viewed. If you’d like help immediately, feel free to search for a similar question, or submit your question or concern.


  • Profile Image

    how can I open a lightbox form directly from javascript ???

    Asked by hgc2002 on October 02, 2012 at 10:29 AM

    I'm using lightbox form. The given example works using a anchor like 

    Email Sign-up Form

     

    But know i need to open it when another buttons get into action. I don't see any method to open the form without click in the anchor. I've tried with jQuery triggering click event in the anchor but it fails.

     

    How can I open the form without using the anchor?

     

    Thanks for your time.

     

    Regards,

    Herman

    Page URL:
    currentlyinconstruction

  • Profile Image
    JotForm Support

    Answered by Rodjit on October 02, 2012 at 11:41 AM

    Hi Herman,

    You may try placing this codes into your website:

    <script>

             window.open("http://form.jotform.me/form/22686092485463");

                </script>

    <?php } ? >

    Example: http://katipunan.biz/test-popup/

    Please note to change the URL of the form in script.

    Hope this helps. Thanks

  • Profile Image
    JotForm Support

    Answered by abajan on October 02, 2012 at 12:22 PM

    Hi Herman

    Notwithstanding that you asked for a solution that doesn't use the anchor, as an alternative, according to Dan Shulz (deceased) in this thread, you could enclose a span within the anchor tags and style it via CSS to look like a button. (Here are some CSS3 examples but your buttons need not be that fancy!)

    It's also possible to have the lightbox automatically open when the page loads (as demonstrated at this link) by adding an openOnLoad: true parameter to the lightbox code. In such cases, the anchor link can be omitted.

    The solution offered in this thread may also be useful.

    Later today, I'll test out Dan's solution later and post a demo here.


    Wayne