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

    SubLabels: HTML tags are not parsing

    Asked by kdaszuta on January 13, 2017 at 08:47 AM

    Hi!

    I've noticed that recently HTML parser in sublabel has been disabled. Is there any way to enable it?

    I'm interested only in BR, B and I tags.

     

    Kind regards

    Kris

     

  • Profile Image
    JotForm Support

    Answered by Nik_C on January 13, 2017 at 09:10 AM

    Hello Kris, 

    I tested our forms and it's true tags are not rendering properly. Let me address this concern to our backend team for further checking. We'll get back to you through this thread as soon as possible.

    Thank you for your patience.

     

  • Profile Image
    JotForm Support

    Answered by Scott on January 13, 2017 at 11:00 AM

    Hey Kris,

    Due to the latest security precautions, HTML codes are not allowed on many parts of the form.

    However you can stylize your sub labels via our form designer by using CSS helper;

    If there is anything else we can help you with, just let us know,

    Cheers.

  • Profile Image

    Answered by kdaszuta on January 13, 2017 at 11:10 AM

    That is not really helpful.

    How supposedly can I bold one word in sentence in sub label using CSS?

    BTW your security precautions are very inconsistent. You got rid of HTML in sub labels, but left it in HTML text block. You should rather improve your input parser to prevent XSS and other nasty stuff.

     

    Regards,

    Kris

  • Profile Image
    JotForm Support

    Answered by Scott on January 13, 2017 at 02:40 PM

    Hey again Kris,

    I will forward your feedback regarding security issues, so thank you for that.

    On the other hand, I went ahead and looked at how you were using HTML codes on your sub-labels.

    In case of your scenario, you can use the after pseudo element. With this pseudo element, you can use CSS to add content to your HTML and stylize it. In case of the special characters, you should use hexademical values. You can use this website for the conversion: https://r12a.github.io/apps/conversion/

    I cloned one of your forms and tested a CSS snippet which goes like:

    .form-sub-label {
        max-width : 250px;
    }

    .form-sub-label:after {
        content : "\0020 \005C \0020 \002F \0020 \003A \0020 \002A \0020 \003F \0020 \0022 \0020 \003C \0020 \003E \0020 \007C";
        font-weight: bolder;
    };

    With the max-width property, you can break the line without HTML tags. Also before applying the content property delete the part where you list the special characters list from your sub-label, since we are going to add them with the after pseudo element.

    When you inject this CSS snippet, your sub-label will look like this:

    I hope this information will help you better. If there is anything else I can do for you, please let me know,

    Cheers.