Bug #69811
closed
EXT:form - trim filter does not seem to work
Added by Björn Jacob about 9 years ago.
Updated about 9 years ago.
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
- Subject changed from Forms: trim filter does not seem to work to EXT:form - trim filter does not seem to work
- 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.
- 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
}
Also available in: Atom
PDF