Tags:
forms1Add my vote for this tag create new tag
, view all tags

Cross-Web Forms

I have multiple webs within a TWiki sharing the same classifications. In hand I do not want to create these classifications (better form-definitions) multiple times within the same TWiki.

Features:

  • forms should be clickable (means: title must be clickable)
  • value should not include the form-web prefix.

    Form.XYTopic 
     as form-definition

    Web.XYForm 
     refers to Form.XYTopic as select/checkbox

Implementing this is very trivial:

TWiki::renderFormData: check if Title includes . an append this web-prefix to the value.

            if ($title =~ /\./) { 
               my ($t1, $t2) = split (/\./, $title); 
               # mskg: regexp should not be evaluated!
               $value = $t1 . "." . $value if ($value ne "" && !($value =~ /^$t1\./));
            }

Form::link: change rendering since you want the form to be rendered as the topic-view.

    if ($name =~ /\./)
    {
       ($web, $name) = split (/\./, $name);
    }
    
    
    if( &TWiki::Store::topicExists( $web, $name ) ) {
    ...

-- MarkusKling - 25 Jul 2002

Topic revision: r2 - 2008-09-16 - TWikiJanitor
 
Twitter Delicious Facebook Digg Google Bookmarks E-mail LinkedIn Reddit StumbleUpon    
  • Download TWiki
TWiki logo Powered by PerlIdeas, 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.