create new tag
, view all tags


We have a system external to the twiki that generates a Call ID.

However, I want to add specific documentation about these IDs in the twiki.

I have created a simple form that has the ID (which I need to save in a FORMFIELD in the new topic) and I want to be able to generate the new topic name based on this field.

That is, the topic for ID 1234 should be "Call_1234".

At the moment I have to get the users to fill out the topic name (which defaults to "Call_NNNN") as well as the "ID" field.

Is there any way I can create the topic name dynamically from the ID number enterred?


TWiki version: TWikiRelease04x01x01
TWiki plugins: DefaultPlugin, EmptyPlugin, InterwikiPlugin
Server OS: RedHat Linux
Web server: Apache
Perl version: 5.8
Client OS:  
Web Browser:  

-- DuncanKinnear - 28 Feb 2007


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.

Have found a way of doing this using a two-stage process.

The first topic just has a very simple web form to input the "CallID", and with the action of the form set thus:

<form action='%SCRIPTURLPATH{"view"}%/%WEB%/CreateCallStageTwo'>
The "CreateCallStageTwo" topic has another web form (similar to the original single web form) that has an action defined thus:
<form action='%SCRIPTURLPATH{"edit"}%/%WEB%/Call_%URLPARAM{"CallID"}%'> 
This two-stage process also has the added benefit that I can make the "CreateCallStageTwo" topic viewable only to users that are logged in (it's web form references %WIKIUSERNAME%).

Although I'm going to set the status of this question to "Answered", I'd still like to know if there is a way to do this in one step.

-- DuncanKinnear - 01 Mar 2007

Great idea, Duncan! I have the same problem with generating new topics based on form fields, but I'll try your idea. Thanks! smile

Anyway, I think that it IS possible to do it in only 1 step, because, i e, when you are creating a new topic, its similar: you introduce a topic name and Twiki creates that topic for you matching what you introduced...

-- RaquelAlegre - 25 May 2007

I'm also interested in it. I would like to create new topic, which name will be create from formfield of form included in this topic. I have a form to create new topics with data inserted in a form. During new topic creation I would like to create name of topic from two formfields. Any idea how to put data from formfield to topic name during topic creation?

-- AnnaPapierz - 28 May 2007

If you want to rely on Javascript you can fill the topic name from the two form fields the user entered. Do the Javascript action on focus loss, e.g. using onblur="" on the two form fields. You could show the topic name to the user, or put it into a hidden form field.

-- PeterThoeny - 29 May 2007

I've explained how i did it using javascript in NameTopicBasedOnFormFieldContent, if you want to have a look.

-- RaquelAlegre - 30 May 2007

Related support topics on formfields: AttachURLDoesntWorkInFormField, BatchEditFormFieldValue, CanAFormFieldGetDataFromTheTopic, DateFieldPluginFormFieldIsEditable, DeepRecursionUsingFormfieldInForm, DisplayFormFieldinTopic, DisplayFormfieldBasedOnTopicName, DisplayTopicsBasedOnFormFieldSearch, EvalVariableInFormfield, FormFieldListPlugin, FormFieldValueInMailNotify, FormFieldValuesInsideTopic, FormFieldsInExternalLinks, FormFieldsNotCompletelyFilled, FormatDataFromFormFieldCheckboxType, FormfieldEmptyInFormattedSearch, FormfieldTextareaSearchNotTruncatedProperly, HiddenMandatoryFormFieldsNotHidden, HowToEditFormFieldDataInBodyOfText, HowToEditFormfieldsWithoutEdit, HowToInitialiseFormFields, HowToMetaSearchMultipleFormFields, HowToSearchBasedonFormFieldContents, HowToSearchForFORMFIELD, HowToSearchForTopicNameInFormField, HowToSearchFormFields, HowToSearchFormFields2, HowToSortSearchByDateFormField, HowToUpdateFormFieldValuesWithSearches, HowToUseFormfieldInIFCondition, HowToUseParentFORMFIELDInINCLUDE, InternationalCharactersInFormFields, METAformfieldDisplayBroken, MultipleDateValueFormfield, NameTopicBasedOnFormFieldContent, PreventRenderingOfHtmlFormFields, ProbleminGettingFormField, RenderFormfieldsInText, SEARCHFailWithFormFieldAfterUpgradeTo01Sep2004, SearchBasedOnDateFormfield, SearchForFormfieldsWithVar, SearchFormatFormField, SearchOnTwoOrMoreFormFields, SearchResultOrderedByFormfield, StoreFormFieldMetaFromPlugin, TemplatesAndFORMFIELDS, UrlParamInFormField, UseAFormFieldDateToSortAList, UsingMetaParentWithFormFields, VarOrCalcInsideFormfieldInsideIf, VariableInFormField

-- PeterThoeny - 30 May 2007

Change status to:
Edit | Attach | Watch | Print version | History: r7 < r6 < r5 < r4 < r3 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r7 - 2007-05-30 - 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-2018 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.