Can I use @import url for external CSS file in designer?

  • eiermann
    Asked on May 11, 2016 at 11:55 PM

    Dear JotForm team,

    I would like to use an external CSS file so I only need to make changes to one file and it will apply to all my forms. It seems like it is not working. Is this not supported?

     

    Cheers,

    Chris

    Jotform Thread 837395 Screenshot
  • Chriistian Jotform Support
    Replied on May 12, 2016 at 2:32 AM

    I cloned your form and checked it, and it appears that the external css you have imported is working properly. Upon removing the imported css, the design reverted back to its default.

    Can I use @import url for external CSS file in designer? Image 1 Screenshot 30

    But when I added the imported css again, the design of the form is now changed.

    Can I use @import url for external CSS file in designer? Image 2 Screenshot 41

    The issue appears to be resolved, so no further action is required. If you need further assistance, please let us know.

     

  • eiermann
    Replied on May 12, 2016 at 4:30 AM

    Hi Christian,

     

    thanks for your reply. Unfortunately the imported css from the URL doesn't work for my form. How did you get it to work?

  • Chriistian Jotform Support
    Replied on May 12, 2016 at 5:06 AM

    It appears that the css can only be applied when using http to view the form. Earlier I viewed the form using this link (http://form.jotform.com/61322293891962) which may be why I was able to see the css that was imported. However, upon checking the form using this secure link (https://form.jotform.com/61322293891962) the imported css was no longer applied to the form.

    To resolve the issue, you will either have to host your CSS in a SSL (https) address, or use the unsecure link (http) when viewing the form. Here's the URL to your form using http: http://form.jotformpro.com/40652415804955. You will notice that the css is now applied to your form.

  • eiermann
    Replied on May 12, 2016 at 5:19 AM

    Thank you very much for the insights. Very valuable. Will try to get it hosted on a SSL server. Thanks a lot!

  • beril JotForm UI Developer
    Replied on May 12, 2016 at 7:19 AM

    On behalf of my colleague, you're most welcome. I agree with you. My colleague's suggestion is really good. I also didn't know we are able to use @import with http://. If you have any question or issues, please do not hesitate contacting us. We will be glad to assist you.