Tags:
create new tag
, view all tags

Question

Q: how do I create a page named [[Item2006-10-04-uid566-SomeSimpleDescription]]. from a form?

I know how to create a page with an autoincrementing sequence number - ItemXXXXXXXXXX (10 Xs)

I know how to create a page with a datestamp uniqifying it (+ a sequence number if necessary).

I know how to create a page out of a user providing string - the topic URLPARAM.

But I do not know how to combine the last with the first two. I.e. how do I create a form that asks the user for a title, and then prepends the date and a sequence number to ensure that it is unique?

Environment

TWiki version: TWikiRelease04x00x04
TWiki plugins: DefaultPlugin, EmptyPlugin, InterwikiPlugin
Server OS:  
Web server:  
Perl version:  
Client OS:  
Web Browser:  
Categories: Forms

-- AndyGlew - 05 Oct 2006

Answer

ALERT! If you answer a question - or have a question you asked answered by someone - please remember to edit the page and set the status to answered. The status is in a drop-down list below the edit box.

Assuming users did not turn off JavaScript you can modify the text field named "topic" with desired prefix. The prefix Item2006-10-04-uid566- can added on focus loss.

There is no out of the box solution if you cannot rely on JavaScript though. You'd need to enhance the core to SpecifyTopicPostAndOrPrefixesDuringTopicCreation.

-- PeterThoeny - 05 Oct 2006

 
Change status to:
Topic revision: r2 - 2006-10-05 - PeterThoeny
 
Twitter Delicious Facebook Digg Google Bookmarks E-mail LinkedIn Reddit StumbleUpon    
  • Download TWiki
TWiki logo Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2012 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.