Tags:
create new tag
view all tags

SID-00117: Get Input from Input box

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

      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 Get Input from Input box
SupportCategory

TWiki version 4.2.4
Server OS Windows 2003 Server
Web server Apache 2.2.11
Perl version 5.8.8
Edit | Attach | Watch | Print version | History: r7 < r6 < r5 < r4 < r3 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r7 - 2009-02-23 - 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.