WordPress.org

Ready to get started?Download WordPress

Forums

Contact Form 7
How to add line brake on textarea (7 posts)

  1. Skyforger
    Member
    Posted 3 years ago #

    [textarea* textarea-962 "blaabla blaa:<br/ >blabla bla bla:" ]</p>

    I am trying to add a Default value list:
    like:
    so:
    and so on:

    So user knows what to type in.

  2. Takayuki Miyoshi
    Member
    Plugin Author

    Posted 3 years ago #

    You can use this form:

    [textarea* textarea-962]
    blaabla blaa:
    blabla bla bla:
    [/textarea]
  3. holyyakker
    Member
    Posted 3 years ago #

    Currently this does not seem to be working:

    Your Message<br />
    [textarea your-message x20]
    I just wanted to take a chance to tell you about Mark Bernacki who is running for Mayor in New Britain. I plan on voting for Mark and I think you should do the same.
    
    What makes Mark such a great candidate is that he has a strong history of public service from his time on the Common Council as an Alderman. But he also knows what it takes to run a business in New Britain and has owned his own business in New Britain for a long while now. With his background he'll be able to deliver job growth and new businesses  to New Britain.
    
    I really hope that you'll consider supporting Mark on election day this November. If you want to read more about Mark you can check out his website, www.bernackiformayor.com.
    [/textarea]

    results in this: http://www.bernackiformayor.com/?page_id=29

  4. holyyakker
    Member
    Posted 3 years ago #

    BTW had to put a working update in so here is a SS of the bugged display.

    http://www.bernackiformayor.com/wp-content/uploads/images/broken.jpg

  5. Skyforger
    Member
    Posted 3 years ago #

    So it is not possible at the moment ?

  6. Takayuki Miyoshi
    Member
    Plugin Author

    Posted 3 years ago #

    I'm sorry. There seems a bug remains in the latest Contact Form 7 2.4.5. I'll fix that.

  7. fabthe
    Member
    Posted 3 years ago #

    Hi,

    today, I had almost the same issue and fixed it for my use case.

    @Takayuki Miyoshi:
    My fix is probably not working correct or does not cover the whole issue. Anyway, it probably helps you fixing it:

    1.) shortcode.php => Function: get_shortcode_regex() Line 76:
    I replaced "(?:((?!.*?\[(?:" with "(?:((?!.*?\[\/(?:"
    After this fix, I received the complete content "[textarea] ... [/textarea] in the function do_shortcode_tag()

    2.) formatting.php => Function wpcf7_autop() Line 35:
    I copied this line and pasted it with following adapted reg-ex: "/\[(script|style|textarea).*?\[\/\\1\]/s"
    Now all "\n" in "[textarea]" AND "<textarea> get replaced by <"WPPreserveNewline/>".

    Following should work now:

    [textarea* textarea-962]
    blaabla blaa:
    blabla bla bla:
    [/textarea]

    Following still does not work correctly:

    [textarea* textarea-962]
    blaabla blaa:
    
    blabla bla bla:
    
    bla bla
    [/textarea]

    best wishes
    fabthe

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic