Use Google and custom fonts in form

  • Danielle Carruthers
    Asked on March 3, 2022 at 7:51 AM

    I've tried this numerous times and tried all the alternatives as per the comments below but still no luck when I preview. Please help. Current codes-
    @import url('
    @font-face {
    font-family : 'DM Sans',serif;
    src : url(
    }
    .form-all *{
    font-family: 'DM Sans',serif;
    }
    also tried
    @import url('
    .form-all *
    {
    font-family: 'DM Sans',serif;
    }

  • Marijoy JotForm Support
    Replied on March 3, 2022 at 8:04 AM

    Hello Danielle,

    We will be happy to assist you. May I ask which of your forms are you having issues with, so that we can check on our end? I also cleared your form cache as it can help fix temporary issues. Can you please try again? We will wait for your response.

    Thank you.

  • Goodwin_Anna
    Replied on March 4, 2022 at 3:42 AM

    Hi,


    Thank you. Ideally what I would like to do is have DM Sans Regular as my font in all my forms, then just have the headers as DM Serif. Is there an option to do that? This would be on all the form I have


    Thank you

  • Lorenz JotForm Support
    Replied on March 4, 2022 at 4:12 AM

    Hi there,

    Yes, that is possible, since DM Serif is available in Google font, you can simply import that font to your form.

    You can inject the CSS code below to each of your forms.

    @import url('https://fonts.googleapis.com/css2?family=DM+Sans&family=DM+Serif+Display&display=swap');

    .form-all{

     font-family: 'DM Sans';

    }

    .form-header{

     font-family: 'DM Serif Display' !important;

    }

    Here's a guide: https://www.jotform.com/help/117-how-to-inject-custom-css-codes/

    I hope this helps. Let us know if you need any further assistance.