Tags:
create new tag
view all tags

Question

When I do a SEARCH like this:

%SEARCH{"AnnouncementStatus.*(value\=).*[V]alidAnnouncement" web="Announcements" regex="on" nosearch="on" order="modified" reverse="on" nototal="on" limit="3" format="<dt>[[Announcements.$topic][$formfield(Title)]] $date <dd>$formfield(Announcement,120,...) <dd>&nbsp;" }%

I encounter the problem a problem if the user enters several paragraphs into the textarea variable Announcement. The output is not cut at 120 characters for the formfield Announcement. It is cut at 120 characters of the first paragraph, but then it includes in their entirety all remaining paragraphs of the textarea Announcement.

You can see what I mean here in the box for recent announcements:

http://www.ku.edu/cgiwrap/kups/twiki/view

  • TWiki version: TWiki20030201
  • Perl version: 5.6
  • Web server & version: Apache
  • Server OS: DEC osf
  • Web browser & version: Mozilla
  • Client OS: Linux

-- PaulJohnson - 30 Jun 2003

Answer

Hi - no answer here buta re-iteration of the question. I can't get this to work either. Using "$topic(30, ...)" truncates fine but not "$formfield(name, 30, ...)"

Can anyone help us?? Thanks

-- BenSommer - 30 Dec 2008

Let's try here on this topic's form:

This topic's SupportStatus truncated to 3 characters: Ans...

It works as expected.

-- PeterThoeny - 31 Dec 2008

Thanks Peter -- I guess so. I've also confirmed that it works in other circumstances since posting this the other day. But the problem case I'm dealing with still will not work. The text is not truncated. I don't know what to say. Here's the markup in question. Its from a form template. Maybe something will jump out at you. If not, I guess we close this again and I'll struggle with it on my own.

| Related Goal | select | 1 | None, %SEARCH{"%META:TOPICPARENT.*name\=\"BusinessGoals2009\";META.FORM.*name\=\"BusinessGoalsForm\";" nonoise="on" regex="on" format="$formfield(Goal, 30, ...)" separator=", "}% | Related Goal | |

-- BenSommer - 1 Jan 2009

The working example here is with an input field. Not sure if the truncation works with a text area.

-- PeterThoeny - 02 Jan 2009

Edit | Attach | Watch | Print version | History: r6 < r5 < r4 < r3 < r2 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r6 - 2009-01-02 - 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.