Fast Secure Contact Form
[resolved] how to format default text in textarea field (4 posts)

  1. aeime
    Posted 3 years ago #

    I have a textarea field "Your address", and have entered some default text "Street: Suburb: State: Post Code:", how can I get default text so that each option appears on a new line.

    I tried
    after each item, but it didn't work.

    I was hoping to reduce the number of fields running down the pages. Thank you.


  2. aeime
    Posted 3 years ago #

    the post didn't show the code. I tried to enter "br" between each item, to have them appear on new lines, but this didn't work.

  3. Mike Challis
    Plugin Author

    Posted 3 years ago #

    I fixed this for the next version.
    Instead of br, use \n for each line break

    Only works for default text of textarea extra fields


    change line 152-153 from:

    if($si_contact_opt['ex_field'.$i.'_default_text'] != '' && ${'ex_field'.$i} == '')
    $string .=  esc_attr($si_contact_opt['ex_field'.$i.'_default_text']);


    if($si_contact_opt['ex_field'.$i.'_default_text'] != '' && ${'ex_field'.$i} == '')
    $string .=  esc_attr(str_replace('\n', "\n", $si_contact_opt['ex_field'.$i.'_default_text']));
  4. aeime
    Posted 3 years ago #

    thanks Mike. For some reason wordpress times out every time I try to update the php file. I'll keep trying though :)

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Fast Secure Contact Form
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic