• Resolved yeevpro

    (@yeevpro)


    I’ve been told you can have HTML in the Description but when I try it out, the ending tags get stripped out when the form is saved or does not display at all. For example: <b>HTML Test</b><hr style=”background: style: red;”>

    The <b> tag works fine though. ??

    When I try adding a link, i.e. Form blah, blah and etc., the form breaks and does not display.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Hi yeevpro,

    Yes, you should definitely be able to add HTML to descriptions in your forms. However, there are two issues behind the hr tag use:

    1) <hr style="background: style: red;"> isn’t valid HTML. This is partly a typo (proper format is <hr style="background: red;">), however the hr tag doesn’t accept background colors since it has no visible background. To change the color of the line itself, please see below.

    2) The styles that we apply to form contents as a whole (which alter border styles that the hr tag uses) will prevent the <hr> tag from appearing normally.

    We can fix this, though, with a bit of custom CSS:

    div.wpforms-container-full hr, 
    div.wpforms-container-full .wpforms-form hr {
         border-top: 1px solid #8c8b8b; 
    }
    

    In case it helps, here’s a tutorial that shares how you can add custom CSS to your site.

    As to the link HTML, that’s odd. Would you mind sharing copying the HTML you used here or sharing a screenshot of it in the form builder? That should help me get a better idea of what could be happening.

    Thanks! ??

    Thread Starter yeevpro

    (@yeevpro)

    Hi Jess,
    I guess I got the a href work now. Thanks for the info. I apparently had it inside a <h2>. Is there list of html tags that are not allowed? I tried a <h1> and it didn’t work as well

    Hi yeevpro,

    Interesting, I’m not sure why you’d run into that issue — an a tag should work inside any header tag. In case there was a formatting issue, here’s an example of how I’d set that HTML up:

    <h2><a href="site.com/link">Text</a></h2>

    The font size doesn’t end up as large as it normally would since the description text is scaled down as a whole, but should otherwise work as normal. I added this HTML to a form on my test site so I could share a couple screenshots — in form builder and on front end.

    I hope that helps! ??

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘HTML in Description’ is closed to new replies.