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

    iFrame embed widget settings

    Asked by AgilityAssoc.Canada on May 26, 2017 at 06:36 PM

    iFrame embed widget settings

    When I was working on it yesterday I used console and found some JavaScript in a html file that sets width and height of the iframe. I was trying to set my own width and height in the iframe with custom css, So which has the priority? Would using !IMPORTANT over ride the java script?

    widgets.jotform.io

     
        (function(ready) {
          ready(function() {
            JFCustomWidget.subscribe("ready", function(data) {
              var params = JFCustomWidget.getWidgetSettings();
              if (params.url) {
                var transparent = ('transparent' in params && params.transparent === 'Yes') ? 'true' : 'false';
                var iframe = document.createElement('iframe');
                iframe.setAttribute('src', params.url);
                iframe.setAttribute('allowtransparency', transparent);
                iframe.setAttribute('frameborder', '0');
                iframe.style.border = 'none';
                iframe.style.margin = 0;
                iframe.style.width = (data.viewWidth || 560) + 'px';
                iframe.style.height = (data.viewHeight || 400) + 'px';
                document.body.appendChild(iframe);
              }
            });
          });

     

  • Profile Image
    JotForm Support

    Answered by Mike_G on May 26, 2017 at 06:58 PM

    I see that you are referring to this (please see image below)

    That is the default widget's settings which can be overridden by custom CSS injected in the form and would require the help of !important declaration.

    If you have any further questions regarding this, please feel free to contact us again anytime.

    Thank you.

  • Profile Image

    Answered by AgilityAssoc.Canada on May 28, 2017 at 09:10 AM

    Hi,

    Thank you for the clarification. Good to know. 

    Regards Robert