Minifying the CSS file and doing the same with the HTML of the form

  • Profile Image
    CTec
    Asked on November 11, 2016 at 08:30 AM

    Hi Jonathan

    I know this is a bit of a late question in the thread, but do you mean copy the CSS in the Form Designer, minify it, and then paste it back?

    Is it possible to do something similar with the HTML?

  • Profile Image
    Welvin
    Answered on November 11, 2016 at 08:34 AM

    I think Jonathan meant to suggest doing it on the source codes. Importing it back in the form designer won't work because the original stylesheet is still present in the form. It's also possible in the HTML, of course, but still, you have to do it by using the source codes embed. 

    https://www.jotform.com/help/104-How-to-get-the-Full-Source-Code-of-your-Form

    You can generate a minified version of the files on these website: 

    http://csscompressor.com/

    http://www.willpeavy.com/minifier/ 

  • Profile Image
    CTec
    Answered on November 11, 2016 at 08:54 AM

    Hi Welvin

    I'm not quite sure what you mean. Are you say that if I want to run minified code I have to host the Jotform HTML and CSS on my sites web server?

  • Profile Image
    Welvin
    Answered on November 11, 2016 at 09:21 AM

    Yes, correct. For the HTML of the form, there is no way you can import it back to Jotform. For the CSS, you can add the minified version in the designer, but the original stylesheet is still present in the form so it's a kind of useless solution. The best way would be to get the form source codes, minify it and host it on your own server. 

    If you want to embed the minified HTML, you can get its absolute URL and embed it as an iframe in the page. You can generate an iframe on this page: http://7thspace.com/webmaster_tools/iframe_generator.html