Tags:
create new tag
, view all tags

Question

I have defined a TWikiForm in WebTopicEditTemplate and need a text field to default to a value. For example Attrib=UNDEFINED.

Do I need to set Attrib=UNDEFINED in the Form? or in WebTopicEditTemplate? Or am I barking up the wrong tree.

Environment

TWiki version: TWikiRelease01Feb2003
TWiki plugins: DefaultPlugin, EmptyPlugin, InterwikiPlugin, CalendarPlugin
Server OS: RedHat 7.3, kernel 2.2.18
Web server:  
Perl version: 5.005_03
Client OS:  
Web Browser: IE 6

-- BobDole - 23 Sep 2003

Answer

TWikiForms#Defining_a_Form_in_One_Topic describes that the Values column in the form definition table lists the possible values for your form - at least with respect to radio buttons and check boxes. In these cases, the first value listed will be the default value selected. For type=text there is no default value set, but what happens if you specify one (I haven't tried)?

If your form will be used on many pages, it may be an idea to create a template topic that has suitable form values selected and filled in. You can do this in the WebTopicEditTemplate if all your pages should default to these values.

-- TorbenGB - 24 Sep 2003

As Torben said, define the default values in a template topic. Default values for text fields cannot be set in the form definition topic.

-- PeterThoeny - 25 Sep 2003

Topic revision: r3 - 2003-09-25 - 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.