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

    Why can't I embed lightbox codes in a free text html field?

    Asked by websecurites12 on August 10, 2011 at 07:01 PM

    Hello,

    How to insert a form in Lightbox mode in another form in a "Free text (HTML)" part

     

    That is to say that in the form number two--we could via a link, access the form number (Lightbox).



    We can not.


    Here's the script of the form light box :

    <script src="//www.jotform.com/min/g=feedback" type="text/javascript">new JotformFeedback({formId:'12215426138',base:'http://www.jotform.com/',windowTitle:'Web Sécurités vous informe ...',background:'#D91414',fontColor:'#FFFFFF',type:false,height:380,width:538});</script><a class="lightbox-12215426138" style="cursor:pointer;color:blue;text-decoration:underline;">Actu.fb - 01 - msg électronique tentative piratage</a>

    Thanks in advance for your valuable help.

     

    You're a great team!

    Bien Cordialement,
    Morgan SETTURA
    Service des signalements Internet
    Web Sécurités
    contact@websecurites.com
    www.websecurites.com
    Votre sécurité, Notre engagement ... 

  • Profile Image
    JotForm Support

    Answered by NeilVicente on August 10, 2011 at 07:45 PM

    Hi Morgan,

    Scripts are not allowed to be embedded in Free Text HTML fields. This rule is put in place to prevent problems arising from conflicts with the embedded scripts and the form's own scripts.

    I regret to tell you that what you're trying to achieve is impossible. The form builder will strips out script tags every time. There is no workaround to this. Sorry.

    Perhaps you would want to try using pop-up codes instead, as demonstrated in this sample form - http://www.jotform.com/form/12214253573


    Neil

  • Profile Image

    Answered by Morgan SETTURA on August 11, 2011 at 05:39 AM

    Hi Neil,<

    Thanks for your response.
    How do I get the pop up is centered on the page? (And not upper-left).

    Thanks in advance.
    Bien Cordialement,
    Morgan SETTURA
    Service des signalements Internet
    Web Sécurités
    contact@websecurites.com
    www.websecurites.com
    Votre sécurité, Notre engagement ... 
  • Profile Image

    Answered by WebSecurites on August 11, 2011 at 11:20 AM

    Hi Neil,

    Thanks for your response.
    How do I get the pop up is centered on the page? (And not upper-left).

    Here's the script in question :
    <a target="_blank" href="javascript:void( window.open('https://www.jotform.com/form/12215426138', 'blank','scrollbars=yes,toolbar=no,width=700,height=500'))">Actu.fb - 01 - msg électronique tentative piratage</a>

    Thanks in advance.

    Bien Cordialement,
    Morgan SETTURA
    Service des signalements Internet
    Web Sécurités
    contact@websecurites.com
    www.websecurites.com
    Votre sécurité, Notre engagement ... 

  • Profile Image
    JotForm Support

    Answered by NeilVicente on August 11, 2011 at 04:57 PM

    Hi,

    Try adding top and left properties to the window.open() method

    <a target="_blank" href="javascript:void( window.open('https://www.jotform.com/form/12215426138', 'blank','scrollbars=yes,toolbar=no,width=700,height=500,top=100,left=300'))">Actu.fb - 01 - msg électronique tentative piratage</a>

    The problem with this solution is that the user's resolution is not taken into consideration. It means that no matter what value you use for the top and left properties, the pop-up cannot always be centered on all computers.

    Some extra JavaScript will be needed to properly implement an auto-centering popup, but as we know, JavaScript cannot be inserted in a form created with Jotform.


    Neil

  • Profile Image

    Answered by websecurites12 on August 11, 2011 at 05:20 PM

    Hi !

    Thanks for this response.
     
    Can you give a name to the tab (page) pop up ?
  • Profile Image

    Answered by boogerd on February 07, 2013 at 09:39 PM

    is there a way not to worry abotu resolution and just use some sort of top=center?

  • Profile Image
    JotForm Support

    Answered by abajan on February 07, 2013 at 09:56 PM

    @boogerd

    As we would prefer to deal with separate issues in their own threads, please open a new thread and post your question. Title it: How do I Center a Lightbox Regardless of Screen Resolution?

    Thanks.