Can I get a light box form to open directly without creating a hyperlink?

  • Profile Image
    tomdrg
    Asked on September 10, 2011 at 07:10 AM

    I have created a light box form that I want to open directly when a sub menu in my menu bar is clicked. At the moment it opens that page and then you have to click on the link.

     

    You can see what I mean here http://pronetrentals.co.nz.123online.co.nz/tenants/online-application-form/. What I want to create is the ability for user to open the form directly when they go through the menu bar (hover over tenants and select Online Application Form).

     

    I am reasonable new at all this stuff so im not sure if it is do-able in Jot Form or if I need to somehow do it directly in my website.

     

    Cheers,

    Tom

  • Profile Image
    abajan
    Answered on September 10, 2011 at 10:34 AM

    Hi tomdrg

    I think this related thread may help in the furtherance of your objective but I'm not guaranteeing anything. I'll need to investigate your website's source more to see how feasible the solution provided by my colleague Liyam would be in your case. Hopefully I can do that within a reasonable period of time.

    Of course, in the interim one of the other JotForm support team members (perhaps Liyam himself) may well provide the ideal solution.


    ~ Wayne

  • Profile Image
    abajan
    Answered on September 10, 2011 at 10:50 AM

    Hi again

    After some preliminary tests with a local page on my computer, I think it should work! Replace the lightbox code you currently have on the page with this and let us know the result.

    Cheers


    ~ Wayne

    EDIT: Further testing on my end indicates that the lightbox loads faster if the code is placed in the head of the page, as opposed to the body.

  • Profile Image
    tomdrg
    Answered on September 10, 2011 at 11:01 PM

    Hi Wayne,

    Thanks for the help, I really appreciate it!

    I have got the light box opening directly now when the link is clicked. I had to splice together the code you provided and an extra line from the related thread you suggested as I couldnt get the code you provided to work on its own? Here the code I used, I added the bold line at the top:

    <body onload="document.getElementById('lightbox-12293918612').click()">
    <script src="//www.jotform.com/min/g=feedback" type="text/javascript">
    new JotformFeedback({
    formId:'12293918612',
    base:'http://www.jotform.com/',
    windowTitle:'Online Application Form',
    background:'#4B4B4B',
    fontColor:'#FFFFFF',
    type:1,
    height:640,
    width:707
    });
    </script>
    <p><input id="lightbox-12293918612" style="display:none" type="submit" value="lightbox" />

    It was a bit of trial and error as I was working with the code suggested in the related thread before you posted up the code for me to use. Is there going to be an issue using that additional bold piece of code?

    Cheers,
    Tom  

     



     

  • Profile Image
    tomdrg
    Answered on September 11, 2011 at 01:17 AM

    Hi Albert,

    Yea good idea thanks for the tip!

    Thanks again.
    Tom  

  • Profile Image
    faturema
    Answered on September 11, 2011 at 01:36 AM

    Cuando dicen que desde mi formulario puedo recibir máximo 100 mensajes por mes ¿se refieren a 100 mensajes por cada formulario que cree? o es la suma de todos los formularios que sólo puedo recibir 100 mensajes por mes?

  • Profile Image
    abajan
    Answered on September 11, 2011 at 08:06 AM

    @Tom

    Sorry about that slip-up. I forgot to include that line when copying the code to my pastebin paste. It's a good thing I included the link to Liyam's solution, eh? :)

    Anyway, we're very glad to hear that everything worked out.

    Cheers :)


    ~ Wayne

  • Profile Image
    anil kumar
    Answered on August 18, 2012 at 02:12 AM

    i want to open a lightbox form on bodyload automatically, how can i do it?

  • Profile Image
    idarktech
    Answered on August 18, 2012 at 04:53 AM

    @anil kumar

    You may find this thread helpful: http://www.jotform.com/answers/28146-how-do-I-have-my-form-popup-in-lightbox-as-soon-as-they-visit-my-site

    Do let us know if you need assistance on implementing this. Thank you.

  • Profile Image
    Answered on August 30, 2012 at 11:46 AM

    JotForm Support,

    Can you please review te soure code below and advise why the form would not execute on page entry?

     

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>Untitled Document</title>
    <style>
    body {background-color:#000000;}
    </style>
    <script src="//jotform.us/min/g=feedback2" type="text/javascript">
    new JotformFeedback({
    formId:'22424658588162',
    base:'http://www.jotform.us/',
    windowTitle:'Garage Door Experts | Customer Review',
    background:'#FFA500',
    fontColor:'#FFFFFF',
    type:2,
    height:500,
    width:700
    });
    </script>
    </head>

    <body onload="document.getElementById('lightbox-12293918612').click()">


    <input id="lightbox-12293918612" style="display:none" type="submit" value="lightbox" />
    </body>
    </html>

     

    The live url can be located here

  • Profile Image
    abajan
    Answered on August 30, 2012 at 12:22 PM

    Please add an openOnLoadonload:true; parameter to your lightbox code as highlighted below:

    new JotformFeedback({
    formId:'20568316339861',
    base:'http://jotform.co/',
    windowTitle:'Contact Us',
    background:'#FFA500',
    fontColor:'#FFFFFF',
    type:2,
    height:380,
    width:322,
    openOnLoad:true
    });


    Also, remove both the onload attribute from the page's body tag, and the input element because they are unnecessary.