Forum

Thread tagged as: Question, Discussion, Field-Types

Best Practices Text Area?

I could be wrong but it appears to me that any time I utilize a text area field type it wraps the text being entered with a paragraph html tag. Is it possible to utilize this tag without having to have the <p> tags being entered automatically?

I would like the <p> tags to be set in the template and have the CMS user just enter plain text for a few different areas. If that isn't possible what would be the next best suggestion.

Matt Holovach

Matt Holovach 0 points

  • 5 years ago

Hi,

You can use the text input:

https://docs.grabaperch.com/docs/templates/attributes/type/text/

<perch:content id="words" type="text" label="text" required="true" size="xxl" />

This just outputs whatever the editor enters. So you could wrap it in whatever html you like, for instance paragraph tags:

<p><perch:content id="words" type="text" label="text" required="true" size="xxl" /></p>
Drew McLellan

Drew McLellan 2638 points
Perch Support

Or use a textarea, but not a formatting language option:

<p>
    <perch:content id="desc" type="textarea" label="Description" />
</p>

Thanks guys I appreciate the responses. I'm getting better at this but I don't always know the best answers.