Index: openacs-4/packages/acs-templating/www/doc/widgets/input.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/doc/widgets/input.adp,v
diff -u -r1.4 -r1.5
--- openacs-4/packages/acs-templating/www/doc/widgets/input.adp 23 Jun 2015 14:23:08 -0000 1.4
+++ openacs-4/packages/acs-templating/www/doc/widgets/input.adp 7 Aug 2017 23:48:03 -0000 1.5
@@ -1,44 +1,60 @@
- These widgets provide a variety of HTML controls, all of which
-are based on This is simply an This widget allows the user to enter one line of text. It is
-completely identical to the <input type="text">. The
- These widgets provide a variety of HTML controls, all of which
+are based on This is simply an This widget allows the user to enter one line of text. It is
+completely identical to the <input type="text">.
+The This widget actually represents a group of radio buttons, at
+described in the general widgets reference. The value of this widget is the text
+string. This widget actually represents a group of radio buttons, at
most one of which can be selected at any given time. The widget has
one required parameter,
The Input Widgets
Overview
<input type="...">
. In particular,
-the hidden, text, radio and checkbox widgets are currently
-implemented; their use is demonstrated in the acs-templating demo.The Hidden Widget
<input type="hidden">
widget,
-which is used for passing pre-set variables along with the
-form.The Text Widget
-html
parameter can be used to set its properties
+The Input Widgets
+
+Templating System : Widget Reference : Input
+Overview
+<input type="...">
. In
+particular, the hidden, text, radio and checkbox widgets are
+currently implemented; their use is demonstrated in the acs-templating demo.The Hidden Widget
+<input
+type="hidden">
widget, which is used for
+passing pre-set variables along with the form.The Text Widget
+-html
parameter can be used to set its properties
(such as size
, maxlength
, etc.), as
-described in the general widgets reference. The value of this widget is the text
-string.The Radio Group Widget
The Radio Group Widget
+-option
option_list, which specifies the
radio buttons to display. The option_list is a list of
-label-value pairs. For example,
+label-value pairs. For example,
-will create a radio button group with 3 options: "Cheap", whose -value is 1000, "Medium", whose value is 50000, and "Expensive", -whose value is 999999. The value of the entire widget is either the -empty string (if the user did not select any of the radio buttons), -or a the value of the currently selected radio button. For -instance, if the user selects "Medium" in the example above, the -value oftemplate::element create test_form cost \ - -label "Car Cost" -datatype number -widget radio \ + -label "Car Cost" -datatype number -widget radio \ -options { {Cheap 1000} {Medium 50000} {Expensive 999999} }
cost
will be 50000
.
+
+will create a radio button group with 3 options: "Cheap",
+whose value is 1000, "Medium", whose value is 50000, and
+"Expensive", whose value is 999999. The value of the
+entire widget is either the empty string (if the user did not
+select any of the radio buttons), or a the value of the currently
+selected radio button. For instance, if the user selects
+"Medium" in the example above, the value of
+cost
+ will be 50000
+.
The default form template renders the Radio Group widget as a column of radio buttons. Since the Radio Group can consist of many -HTML controls, the usual formwidget tag cannot be used -to position the widget; instead, the formgroup tag must be -used.
This widget is identical in use to the Radio Group widget, but +HTML controls, the usual formwidget tag +cannot be used to position the widget; instead, the formgroup tag must +be used.
+This widget is identical in use to the Radio Group widget, but
instead of radio buttons it generates a group of checkboxes, any
number of which can be checked at any given time. The
values
(plural) property of the corresponding element
contains a list of all the checked values; the value
-(singular) property contains the first element in the list.