How to use Google font in form?

  • Profile Image
    CharlottePrattSJ
    Asked on August 07, 2020 at 05:27 AM

    Hi,


    I am trying to add my own font (google font) to my form, however everytime I put the API css connections in and it keeps saying error?


    I have tried:

    <style>
    @import url('https://fonts.googleapis.com/css2?family=Poppins&display=swap');
    </style>


    and also 

    <link target="_blank" href="https://fonts.googleapis.com/css2?family=Poppins&display=swap" rel="stylesheet">


    Do you know if there is another way I can add GOOGLE font?


    thanks

  • Profile Image
    ashwin_d
    Answered on August 07, 2020 at 06:03 AM

    You do not have to add style tag to use Google font. Please use the following CSS code in your form and that will solve your problem:

    @import url('https://fonts.googleapis.com/css2?family=Poppins&display=swap');

    .form-all *{

    font-family: 'Poppins', sans-serif;

    }

    The following guide should help you how to inject custom CSS code in form: https://www.jotform.com/help/117-How-to-Inject-Custom-CSS-Codes 

    You may also like to take a look at the following guide on how to use Google fonts in form: https://www.jotform.com/help/100-How-to-Use-Google-Fonts-and-Custom-Fonts-in-your-Form 

    Hope this helps.

    Do get back to us if you have any questions.