SID-00931: Newlines in form fields break %SEARCH result tables
| Status: |
Answered |
TWiki version: |
5.0.0 |
Perl version: |
v5.10.1 |
| Category: |
CategorySearch |
Server OS: |
Ubuntu 10.04 LTS |
Last update: |
15 years ago |
How can I keep newlines in form fields from breaking tables in formatted searches?
I would like the resulting table in some instances to show the whole text of the field in a table and in other instances, only the first 20 characters.
For the latter, I've tried $formfield(Fieldname, 20, ...) in the format parameter, but that form of $formfield doesn't seem to be working, nor does $formfield(Fieldname, 20) do anything different than $formfield(Fieldname).
For removing the newlines, I've tried %CALC{$SUBSTITUTE($formfield(Fieldname), ... }%, but the newlines in the result of $formfield(Fieldname) seem to kill the %CALC statement.
I've also tried %META, but it doesn't seem to work inside a %SEARCH format.
Suggestions?
--
DavidSturman - 2010-08-08
Discussion and Answer
Use
newline="%BR%" in SEARCH. Details in
VarSEARCH.
--
PeterThoeny - 2010-08-09
Wonderful. Thank you. That worked. I'm not sure why I didn't see it before, given how I thought that I carefully looked through the documentation.
Any idea about why $formfield(Fieldname, 20, ...) doesn't seem to work?
--
DavidSturman - 2010-08-09
--
DavidSturman - 2010-08-09
Known issue,
TWikibug:Item6305
. TWiki is open source software, your help in bug fixing is appreciated.
--
PeterThoeny - 2010-08-09
If you answer a question - or someone answered one of your questions - please remember to edit the page and set the status to answered. The status selector is below the edit box.