Project

General

Profile

Actions

Bug #69811

closed

EXT:form - trim filter does not seem to work

Added by Björn Jacob over 8 years ago. Updated over 8 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Form Framework
Target version:
-
Start date:
2015-09-15
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
7
PHP Version:
Tags:
Complexity:
Is Regression:
No
Sprint Focus:

Description

When using the trim filter on a TEXTAREA form object nothing seems to be filtered. Use the following text which contains spaces, tabs and newlines.

    345670hd jmhdkj         hkldg fd
  gh fdf kjhfdl hgfd   
 g f
Actions #1

Updated by Björn Jacob over 8 years ago

  • Subject changed from Forms: trim filter does not seem to work to EXT:form - trim filter does not seem to work
Actions #2

Updated by Ralf Zimmermann over 8 years ago

  • Status changed from New to Needs Feedback
  • Assignee set to Björn Jacob

I can not reproduce this. If i submit the example text this text are trimmed:

345670hd jmhdkj         hkldg fd
  gh fdf kjhfdl hgfd   
 g f

Trim only affects the start and the end of the string.

Actions #3

Updated by Björn Jacob over 8 years ago

  • Description updated (diff)
  • Status changed from Needs Feedback to Closed
  • Assignee deleted (Björn Jacob)

You're right. Just tested it again with the following form. One has to remember that just the first and last characters from the character list are trimmed. This is a little bit confusing within a TEXTAREA object with content spanning multiple lines.


enctype = multipart/form-data
method = post
prefix = tx_form
confirmation = 1

postProcessor {
    1 = mail
    1 {
        recipientEmail = 
        senderEmail = 
    }
}

10 = TEXTAREA
10 {
    cols = 40
    name = msg
    placeholder = Please enter your message.
    rows = 5
    filters {
        1 = trim
    }
    label {
        value = Message
    }
}

20 = TEXTAREA
20 {
    name = name
    placeholder = Please enter your name.
    filters {
        1 = trim
    }
    label {
        value = Message
    }
}

30 = SUBMIT
30 {
    name = submit
    value = Submit
}

Actions

Also available in: Atom PDF