Tags:
create new tag
, view all tags
Related topics:
While WebForms like the one used for classifying topics in this web are very usefull, they are often distracting from the appearance of a page. Introduce a variable that optionally hides the web form when in view mode. In edit mode the form should be displayed as a reminder to add the necessary classification, etc.

This can easily be done by adding this variable, say %HIDEWEBFORM%, and render

contingent upon this variable.

-- ThomasWeigert - 10 Nov 2002

In what scenario do you need that? I have come across a need to hide selected form fields when viewing a topic, but not for the whole form.

-- PeterThoeny - 10 Nov 2002

This is more an issue of usability and attractiveness of look and feel. On many topics, especially those that contain text only, the WebForm at the bottom is visually overpowering, but has not much information relevant to the topic. As in the Codev web, for example, it often serves to provide metadata that aids in searching for this topic. This information is useful, but not when viewing this topic.

This topic is a good example. Actually, the fact that this is currently a feature enhancement request is usefull, and with some luck this would eventually turn into FeatureTodo, etc. Ignore this for the sake of the argument, please. But look at the page. The first thing you notice is the blue mass of color that draws attention to the form on the bottom.

In other words, the most irrelevant information ends up being displayed the most prominently. I've also thought about moving this form below the topic action bar and making its font smaller, as well as taking out the background color for the headings.... For the situation at this topic, it might be nicest to just have a line in small font that states the TopicClassification.

-- ThomasWeigert - 10 Nov 2002

I've experimented with changing the view.tmpl and TWiki::renderFormData. Please take a look at the example. I think this example speaks for itself...

I think a good compromise would be as follows:

  • Add arguments to TWiki::renderFormData which allow setting of border, bgcolor, font size.
  • Add these arguments to %META{"form"}%
  • Remove the header row in the form, as in the example.
  • Combine with MoveFormButton

I'd be willing to execute these changes, as I've already done most of it in this experiment...

-- ThomasWeigert - 10 Nov 2002

> "the most irrelevant information ends up being displayed the most prominently."
I don't think this is generally true. It strongly depends on how you use your forms. I found myself in the opposite situation: for tracking tickets/open issues, we needed the classification being displayed more prominently -- so I put it into a floating box on the top right of the page. To reduce clutter, I hacked renderFormData() to omit empty fields.

If there are going to be code changes, think about making this configurable per form, not per web. And please, put the layout into a template or stylesheet. Additionally, the desired rendering depends on the page being included or not, cf IncludeWithFormData.

My 2c, PeterKlausner 11 Nov 2002

How about delegating all the work to the TablePlugin? Here the diff between the current, explicitely rendered table of Dec 2001 TWiki and a clean TWiki table:

***************
*** 1543,1560 ****
      my %form = $meta->findOne( "FORM" );
      if( %form ) {
          my $name = $form{"name"};
!         $metaText = "<p />\n<table border=\"1\" cellspacing=\"0\" cellpadding=
\"0\">\n   <tr>";
!         $metaText .= "<th colspan=\"2\" align=\"center\" bgcolor=\"#99CCCC\">
$name </th></tr>\n";

          my @fields = $meta->find( "FIELD" );
          foreach my $field ( @fields ) {
              my $title = $field->{"title"};
              my $value = $field->{"value"};
!             $metaText .= "<tr><th bgcolor=\"#99CCCC\" align=\"right\"> $title:
</th><td align=\"left\"> $value </td></tr>\n";
          }

-         $metaText .= "</table>\n";
-
          $metaText = getRenderedVersion( $metaText, $web );
      }

--- 1558,1573 ----
      my %form = $meta->findOne( "FORM" );
      if( %form ) {
          my $name = $form{"name"};
!         $metaText = "\n|*$name: $topic*||\n";

          my @fields = $meta->find( "FIELD" );
          foreach my $field ( @fields ) {
              my $title = $field->{"title"};
              my $value = $field->{"value"};
!             $metaText .= "|  $title:|$value  |\n"
!               if ($value);
          }

          $metaText = getRenderedVersion( $metaText, $web );
      }

***************
Next step would be, to control the table options depending on the form type. Insert sth like getPref("FORMAT" . uc($name)) || "" before the table, then * Set FORMATMYFORM = %TABLE{bla bla ...

As to the original question: if you really want to suppress all forms in a web, why not simply delete it from the template?

-- PeterKlausner 15 Nov 2002

Peter, your suggestion is a nice one. As to what the point of suppressing the forms is, I would like to be able to easily store certain metadata with the topic, but not show it when viewing the topic, or at least, show it in a much less intrusive way. Please take a look at the example to see what I mean...

-- ThomasWeigert - 16 Nov 2002

Edit | Attach | Watch | Print version | History: r7 < r6 < r5 < r4 < r3 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r7 - 2003-09-08 - 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-2015 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.