SID-00117: Get Input from Input box
| Status: |
Answered |
TWiki version: |
4.2.4 |
Perl version: |
5.8.8 |
| Category: |
|
Server OS: |
Windows 2003 Server |
Last update: |
16 years ago |
I would like to get an Input sentence from an Input box and I want it to be displayed it on a different topic.
How can I get this done?
Should I be using an user defined variable ?
--
RajeshN - 19 Feb 2009
Discussion and Answer
In the "sending" topic, include this form (view raw), and change the value of
%TOPIC% to your "receiving" topic's name:
Enter some text & hit enter:
Put this in your "receiving" topic:
Your text was:
--
SeanCMorgan - 19 Feb 2009
If you want to have values stored persistently look into custom
CommentPlugin templates.
--
PeterThoeny - 19 Feb 2009
Hi Sean,
I have form with the below code which creates new topics (Eg. Minutes of meetings), I would like to have a short description(must be typed in by user) for each of those newly creeated topics.
When the search for those topics are been done, it should give the result as shown below
MinutesOfMeetingsWeek9x21009 - RajeshN - 23 Feb 2009 - 06:38 - Revision(1) - MyShortDesc
<form name="new" action="%SCRIPTURLPATH{edit}%/%WEB%/">
-
<input type="text" name="topic" class="twikiInputField" value="%TOPIC%Week9x2009" size="32" /> -
-
<input type="hidden" name="topicparent" value="%TOPIC%" />
-
<input type="hidden" name="onlynewtopic" value="on" />
-
<input type="submit" class="twikiSubmit" value="Create New Minutes of Meeting" />
based on: <select name="WebTopicEditTemplate"><option>Default Template</option></select>
</form>
%<nop>SEARCH{"^%<nop>TOPIC%Week[0-9]+x" scope="topic" type="regex" nonoise="on" reverse="on" format=" * [[$topic]] <font size=\"-2\" color=\"gray\"> - $wikiusername - [[%<nop>SCRIPTURL{rdiff}%/%<nop>WEB%/$topic][$date]] - Revision($rev)</font>"}%
--
RajeshN - 23 Feb 2009
You're re-inventing the wheel a bit there: why not use a TWiki form with a description field, rather than creating your own form?
Even simpler would be to use the $summary feature of SEARCH.
--
SeanCMorgan - 23 Feb 2009
Learn about TWiki Forms based applications at
TWikiForms,
TWikiTemplates,
FormattedSearch,
QuerySearch,
SearchPatternCookbook.
--
PeterThoeny - 23 Feb 2009
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.