<div style="overflow:auto">
| *Program Name* | *Priority* | *Status* | *Summary* | *Description* |
%SEARCH{ "ShashaLuan" type="regex" nosearch="on" nosummary="on" nototal="on" web="Sandbox" topic="SearchFieldValueFromForm*" format="| $formfield(Program Name) | $formfield(Priority) | $formfield(Status) | $formfield(Summary) | $formfield(Description) |" }%
</div>
I got this:
| Program Name | Priority | Status | Summary | Description |
|---|
| CIM | high | New | SearchValueFromFormCanNotDisplayCorrectly | 1. test 2. change row 3. see if it can display correctly 4. why it can not change row SearchValueFromFormCanNotDisplayCorrectly |
1. test 2. change row 3. see if it can display correctly <br> 4. why it can not change rowThe second row can be display correctly because i wrote:
1. test<br>2. change row<br>3. see if it can display correctly <br>4. why it can not change rowAs there may be a lot of information write, i don't think tell user to write html code to change row is a right choice. Is there a way to solve that?
I think we have a problem in our documentation, as the parameter you need to give the SEARCH variable in this example, newline, doesn't seem to be documented in the current release.
I have updated SearchFieldValueFromForm to produce the correct result and submitted Bugs:Item25651. test 2. change row 3. see if it can display correctly 4. why it can not change row 5. change row works 6. i need to use enter keyin the form(because i'm haven't leave blank row in writing items), i can see the correct result in the search table, but why it can not be displayed correctly in "WebForm", see SearchFieldValueFromFormTestTwo. I'm confusing about that
-- ShashaLuan - 03 Jul 2006
When you output a table row with format="| something |, and the something has a newline, it will break the table apart since TWiki table rows need to start and end with "|". This can happen if you output a multi-line form field.
As a workaround you can generate an HTML table row instead of a TWiki table row. Example:
<table>
%SEARCH{ "..." ... format="<tr>$n<td> $formfield(foo) </td>$n<td> $formfield(bar) </td>$n</tr>" }%
</table>
-- PeterThoeny - 04 Jul 2006
Actually, there is a difference in the pre-TWiki4 and TWiki4 file format. Specifically the encoding of newlines in form fields (stored in meta data) changed. TWiki 4 encodes and stores newlines in formfields as %0d%0a. I am surprized that your SearchFieldValueFromFormTestTwo example works!
-- PeterThoeny - 04 Jul 2006
Thanks for you reply.
But i still don't know how can i get correct display in the WebForm of the SearchFieldValueFromFormTestTwo ?
-- ShashaLuan - 04 Jul 2006
The display in the form is not different to ordinary display in a topic, and compressing the lines into one is how TWiki works per spec.
If you simply type this:
Line 1.
Line 2.
It will be rendered as one line in the output. This is also how HTML works in general (compressing whitespace).
LikeEMail is discussing this behaviour, feel free to add your voice.
For numbered lists in general you should use the TML syntax for the purpose (both in topics and form fields :-)).
1. Sushi 1. Dim Sum 1. Fondue
-- ShashaLuan - 04 Jul 2006
Did you consider using RecursiveRenderPlugin for your reports. I used it once in a CommentPlugin template for generating a nice looking table where the users where allowed to specify all kind of TML in the collecting form.
-- FranzJosefSilli - 21 Jul 2006
Or the MultiEditPlugin with the noedit option?
-- ThomasWeigert - 25 Sep 2006
Thanks, i will have a try
-- ShashaLuan - 25 Sep 2006