Tags:
create new tag
view all tags

SID-00931: Newlines in form fields break %SEARCH result tables

Status: Answered 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

      Change status to:
ALERT! 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.
SupportForm
Status Answered
Title Newlines in form fields break %SEARCH result tables
SupportCategory CategorySearch
TWiki version 5.0.0
Server OS Ubuntu 10.04 LTS
Web server Apache
Perl version v5.10.1
Edit | Attach | Watch | Print version | History: r5 < r4 < r3 < r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r5 - 2010-08-09 - PeterThoeny
 
  • Learn about TWiki  
  • Download TWiki
This site is powered by the TWiki collaboration platform Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2026 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.