Tags:
create new tag
view all tags

Bug: Using Search With TWiki Forms

I've run into this problem on two different systems, and I may be missing something obvious, but I can't explain what I'm getting so I'm posting here. I've got a TWikiForms on a topic, and within one of the fields on the form I'm using a SEARCH. Then within the text of the topic I try to retrieve the data in that formfield (the results of the SEARCH) using this:

%SEARCH{ "^%TOPIC%[^a-zA-Z0-9]" scope="topic" limit="1" regex="on" nosearch="on" nototal="on" format="$formfield(Description)" }%

where "Description" is the name of the field who's data I'm trying to show (it's a text area). So I do all of this, then I do the preview, and the SEARCH results show up properly in the formfield but not in the topic body. Then when I save the changes after the preview the entire formfield is erased. This problem also occurs with TOPICLIST in the formfield. I do not expect for these things to be magically erased like they are, so if this is what TWiki is supposed to be doing, will somebody explain it to me?

If none of this is clear I can try to explain more.

-- DavidSachitano - 16 Jul 2002

Test case

Environment

TWiki version: 01-Dec-2001
TWiki plugins: SmiliesPlugin
Server OS: Win2k, Linux
Web server: Apache/Tomcat
Perl version: 5.6.1
Client OS: Win2k
Web Browser: MSIE

-- DavidSachitano - 16 Jul 2002

Follow up

This is possibly a Support question. I do not exactly understand the issue.

In case you are trying to use a SEARCH in a form definition topic: This is currently not supported since variables get expanded "after the fact", e.g. after going through the edit form handler.

In case you are trying to use a SEARCH in a form that creates a topic with prepoplated form fields it should work.

-- PeterThoeny - 17 Jul 2002

OK, I will try to clarify. I have just a plain, normal topic to which I add a form. For one of the fields in the form I've added to that topic, rather than explicitly giving it a value, I put a SEARCH instead with the intention of having the results of that search be what shows up in that field when the topic is viewed. When this is done, it all looks fine in the preview, but when the changes are finalized, and it is viewed with the view script, that field is empty in the form. I want to know if it is supposed to just erase what the user has entered in the form, because that is what it's doing.

-- DavidSachitano - 17 Jul 2002

Fix record

Edit | Attach | Watch | Print version | History: r3 < r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r3 - 2002-07-17 - DavidSachitano
 
  • 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-2025 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.