Home Forums General Issues Replace br with p in text area?


Replace br with p in text area?

  • Hi there,
    I have a client who does not want to have to put in any tags whatsoever into fields. But the text area will include paragraphs. I currently have it set to converting lines into br, but I would rather have them set to paragraphs. Is there any way to do this without changing the parameters of the field to allow html tags? Again, client does not know, nor does he *want* to know how to write a single bit of code.

    Thanks in advance.

  • Hi @brotsky_pixie

    You can always use the acf/format_value to modify the returned value of a field. You can explode the value with <br /> as the delimiter, add the pharagraph tags to each paragraph and then join them back.

    I hope this makes sense.

  • Sorry…that just went over my head (of course, it’s almost 2:30am too, so…).

  • Hi @brotsky_pixie

    Don’t worry. Just try it if you have the time. You can always ask me if you stuck at something 🙂


Viewing 4 posts - 1 through 4 (of 4 total)

The topic ‘Replace br with p in text area?’ is closed to new replies.