• I have created a custom field for my registration page.
    It is a Textarea (multi-line) field type.
    When I enter several lines of text on the edit page (i.e. separated by paragraph returns) the text appears as one continuous string of text on the display page; the paragraph returns are not separating the lines.
    Could you please tell me how I might be able display each separate line as a separate line on the actual page?
    I can not send a link, it is a membership site.
    Here is a link to a visual representation of the issue.
    https://www.extrudeit.com/images/textarea.jpg
    I appreciate your help! Thank you!

    https://www.ads-software.com/plugins/s2member/

Viewing 8 replies - 1 through 8 (of 8 total)
  • What do you mean by “display page”? Have you created a display page that prints out a static text representation of a user’s registration profile? If so, then you can run that string through the wpautop function to convert line breaks into HTML paragraph tags.

    For example:
    https://www.shaileshprajapati.com/wordpress/wpautop-wordpress

    Thread Starter ccwadsworth

    (@ccwadsworth)

    Hi Jumbo – thanks so much for your response!
    The display page is the users profile page; yes it is a static representation.
    I appreciate your solution, but I have no idea how to implement what you’ve suggested!
    Can you tell me where I would add this function?
    Much appreciation!!

    On your static page, whatever variable is outputting that particular line of text should be echoed as such:
    <?php echo wpautop($textarea_field); ?>

    I don’t know how you’re generating your page, so that’s about as good a clue as I can provide.

    Thread Starter ccwadsworth

    (@ccwadsworth)

    Thank you Jumbo.
    Still not quite sure what to do with this…
    The page is generated by a shortcode through S2Member (plugin).

    What’s the shortcode? Also, can you post a screenshot of the problem page? A snapshot of just the full profile region will do.

    Thread Starter ccwadsworth

    (@ccwadsworth)

    Not sure the shortcode is going to help you, but here it is: [s2Member-Profile /]
    I posted a link to the screen shot here… https://www.extrudeit.com/images/textarea.jpg

    That shortcode just outputs the form. How are you outputting the static version of that page? Or are you saying the form itself is showing a plain text string instead of the actual textarea field? That’s why I suggested you post a full screenshot of the page in question as I don’t know 100% what you’re referring to.

    Thread Starter ccwadsworth

    (@ccwadsworth)

    It isn’t a form but a text area field the user enters their information
    the resulting display on the page of that same field is showing a plain text string, rather than individual lines of text as entered.

    Here is more another screen shot of the page; not sure it’s going to provide you with any additional info… All of the fields in blue represent the text area. The text in the Inventory “box” should be displaying in individual lines, rather than one string of text.

    https://www.extrudeit.com/images/profilepage.png

    Are you familiar with the S2Member plugin?

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Display multiple lines of text in custom profile field’ is closed to new replies.