[phplib-dev] cvs commit From: uw (phplib-dev <email protected>)
Date: 01/05/01

From: uw
Date: Sat Jan 6 02:03:08 2001
Modified files:
      php-lib/php/form/form.inc
      php-lib/php/form/form_element.inc
      php-lib/php/form/form_element_buttonobject.inc
      php-lib/php/form/form_element_calendar.inc
      php-lib/php/form/form_element_checkbox.inc
      php-lib/php/form/form_element_combo.inc
      php-lib/php/form/form_element_date.inc
      php-lib/php/form/form_element_file.inc
      php-lib/php/form/form_element_fileupload.inc
      php-lib/php/form/form_element_hidden.inc
      php-lib/php/form/form_element_image.inc
      php-lib/php/form/form_element_password.inc
      php-lib/php/form/form_element_radio.inc
      php-lib/php/form/form_element_select.inc
      php-lib/php/form/form_element_selectobject.inc
      php-lib/php/form/form_element_submit.inc
      php-lib/php/form/form_element_text.inc
      php-lib/php/form/form_element_textarea.inc
      php-lib/php/form/form_element_textobject.inc
      php-lib/php/form/form_element_tree.inc
      php-lib/php/form/form_loader.inc

Log message:
- changed form_element::get()

By help of the change you can access every HTML element of a complex form element
such as the calendar. form_element_calendar::get("now") returns the "today/now" button
of the calendar sheet. form_element_calender::get() returns all elements of the
calender without any formatting.

Index: php-lib/php/form/form.inc
diff -u php-lib/php/form/form.inc:1.17 php-lib/php/form/form.inc:1.18
--- php-lib/php/form/form.inc:1.17 Thu Jan 4 15:51:02 2001
+++ php-lib/php/form/form.inc Sat Jan 6 02:02:53 2001
@@ -26,7 +26,7 @@
 * - tree (select box with options show as a tree)
 *
 *  <email protected> Ulf Wendel <ulf.wendel <email protected>>
-*  <email protected> $Id: form.inc,v 1.17 2001/01/04 14:51:02 uw Exp $
+*  <email protected> $Id: form.inc,v 1.18 2001/01/06 01:02:53 uw Exp $
 *  <email protected> public
 *  <email protected> Form
 */
@@ -582,23 +582,23 @@
         * Generate and return the html representation of an element.
         *
         *  <email protected> string Element name
- *  <email protected> string Element value, only used with radio - FIXME
+ *  <email protected> string Element subname
         *  <email protected> string HTML
         *  <email protected> form_error
         *  <email protected> public
         */
- function getElement($elname, $value = "") {
+ function getElement($elname, $subname = "") {
                 if (!$this->ElementExists($elname)) {
                         $this->exceptions[] = new form_error("'$elname' is unknown.", __FILE__, __LINE__);
                         return "";
                 }
                 
                 if (!isset($this->radio_elements[$elname]))
- return $this->elements[$elname]->get($value);
+ return $this->elements[$elname]->get($subname);
                 
                 $html = "";
                 foreach ($this->radio_elements[$elname] as $name => $v)
- $html .= $this->elements[$name]->get($value);
+ $html .= $this->elements[$name]->get($subname);
                 
                 return $html;
         } // end func getElement
@@ -906,7 +906,7 @@
                         $js = sprintf('[%s]', substr($js, 0, -2));
                         
                 // ;-) compress the JS code....
- $base_code = $this->compressJS($base_code);
+ //$base_code = $this->compressJS($base_code);
                                                                                                 
                 // customize the error message
                 $base_code = str_replace("{ERROR_MSG_PREFIX}", $this->js_error_prefix, $base_code);
Index: php-lib/php/form/form_element.inc
diff -u php-lib/php/form/form_element.inc:1.7 php-lib/php/form/form_element.inc:1.8
--- php-lib/php/form/form_element.inc:1.7 Tue Jan 2 16:49:29 2001
+++ php-lib/php/form/form_element.inc Sat Jan 6 02:02:54 2001
@@ -3,7 +3,7 @@
 * Superclass of all form elements.
 *
 *  <email protected> Ulf Wendel <uw <email protected>>
-*  <email protected> $Id: form_element.inc,v 1.7 2001/01/02 15:49:29 uw Exp $
+*  <email protected> $Id: form_element.inc,v 1.8 2001/01/06 01:02:54 uw Exp $
 *  <email protected> public
 *  <email protected> Form
 *  <email protected>
@@ -438,17 +438,20 @@
         /**
         * Returns the HTML code of the element.
         *
- *  <email protected> string $value The value is only used with radio buttons.
- * If the given value is equal to the value of the
- * element when it was defined, the radio gets selected.
+ *  <email protected> string $subelement Some complex form elements consists of several
+ * HTML form elements. Date e.g. uses several select boxes.
+ * The subelement name allows you to retrive each of this
+ * "subelements". To get the year selector of a "Ymd"
+ * date element you would use the "Y" as a subelement name.
+ *
         *  <email protected> string $html HTML code of the element.
         *  <email protected> public
         *  <email protected> getfrozen(), show()
         *  <email protected>
         */
- function get($value = "") {
+ function get($subelement = "") {
                 if (true == flag_frozen)
- return $this->getfrozen($value);
+ return $this->getfrozen($subelement);
                 return "";
         } // end func get()
                 
@@ -459,10 +462,10 @@
         *  <email protected> string $html HTML code of the frozen element.
         *  <email protected> get(), show()
         */
- function getfrozen($value = "") {
+ function getfrozen($subelement = "") {
                 return sprintf('%s%s',
- $this->getFrozenHiddenElement($value),
- ("" != $value) ? $this->value : $value
+ $this->getFrozenHiddenElement(),
+ $this->value
                                                                                 );
         } // end func getfrozen()
         
Index: php-lib/php/form/form_element_buttonobject.inc
diff -u php-lib/php/form/form_element_buttonobject.inc:1.6 php-lib/php/form/form_element_buttonobject.inc:1.7
--- php-lib/php/form/form_element_buttonobject.inc:1.6 Tue Jan 2 16:49:30 2001
+++ php-lib/php/form/form_element_buttonobject.inc Sat Jan 6 02:02:54 2001
@@ -3,7 +3,7 @@
 * Superclass of all buttons.
 *
 *  <email protected> Ulf Wendel <uw <email protected>>
-*  <email protected> $Id: form_element_buttonobject.inc,v 1.6 2001/01/02 15:49:30 uw Exp $
+*  <email protected> $Id: form_element_buttonobject.inc,v 1.7 2001/01/06 01:02:54 uw Exp $
 *  <email protected> public
 *  <email protected>
 *  <email protected> Form
@@ -28,8 +28,8 @@
         */
         var $tabindex = -1;
         
- function getFrozen($value = "") {
- return $this->getFrozenTable(1, $this->name) . $this->getFrozenHiddenElement($value);
+ function getFrozen($subelement = "") {
+ return $this->getFrozenTable(1, $this->name) . $this->getFrozenHiddenElement();
         } // end func getFrozen
         
 } // end class form_element_buttonobject
Index: php-lib/php/form/form_element_calendar.inc
diff -u php-lib/php/form/form_element_calendar.inc:1.1 php-lib/php/form/form_element_calendar.inc:1.2
--- php-lib/php/form/form_element_calendar.inc:1.1 Sat Jan 6 01:48:25 2001
+++ php-lib/php/form/form_element_calendar.inc Sat Jan 6 02:02:55 2001
@@ -6,7 +6,7 @@
 * Maybe someone would like to add new features to it.
 *
 *  <email protected> Ulf Wendel <ulf.wendel <email protected>>
-*  <email protected> $Id: form_element_calendar.inc,v 1.1 2001/01/06 00:48:25 uw Exp $
+*  <email protected> $Id: form_element_calendar.inc,v 1.2 2001/01/06 01:02:55 uw Exp $
 *  <email protected> Form
 */
 class form_element_calendar extends form_element {
Index: php-lib/php/form/form_element_checkbox.inc
diff -u php-lib/php/form/form_element_checkbox.inc:1.7 php-lib/php/form/form_element_checkbox.inc:1.8
--- php-lib/php/form/form_element_checkbox.inc:1.7 Tue Jan 2 16:49:31 2001
+++ php-lib/php/form/form_element_checkbox.inc Sat Jan 6 02:02:55 2001
@@ -5,7 +5,7 @@
 *  <email protected> Ulf Wendel <ulf.wendel <email protected>>
 *  <email protected> public
 *  <email protected> Form
-*  <email protected> $Id: form_element_checkbox.inc,v 1.7 2001/01/02 15:49:31 uw Exp $
+*  <email protected> $Id: form_element_checkbox.inc,v 1.8 2001/01/06 01:02:55 uw Exp $
 */
 class form_element_checkbox extends form_element_checkobject {
         
@@ -18,10 +18,10 @@
                 return $this->checked;
         } // end func isChecked
 
- function get($value="") {
+ function get($subelement = "") {
 
                 if (true == $this->flag_frozen)
- return $this->getfrozen($value);
+ return $this->getfrozen($subelement = "");
         
                 $html = "";
                 $html .= sprintf('<input type="checkbox" name="%s" ', $this->name, $this->value );
@@ -41,8 +41,8 @@
                 return substr($html, 0, -1) . ">" . $this->CR_HTML;
         } // end func get
         
- function getfrozen($value = "") {
- return ($this->checked) ? '[x] $value' . $this->getFrozenHiddenElement($value) : sprintf('[ ]%s', $this->CR_HTML);
+ function getfrozen($subelement = "") {
+ return ($this->checked) ? '[x] $value' . $this->getFrozenHiddenElement() : sprintf('[ ]%s', $this->CR_HTML);
         } // end func getfrozen
         
         function getJSValue() {
Index: php-lib/php/form/form_element_combo.inc
diff -u php-lib/php/form/form_element_combo.inc:1.8 php-lib/php/form/form_element_combo.inc:1.9
--- php-lib/php/form/form_element_combo.inc:1.8 Thu Jan 4 01:07:40 2001
+++ php-lib/php/form/form_element_combo.inc Sat Jan 6 02:02:56 2001
@@ -4,7 +4,7 @@
 *
 *  <email protected> Ulf Wendel <uw <email protected>>
 *  <email protected> Form
-*  <email protected> $Id: form_element_combo.inc,v 1.8 2001/01/04 00:07:40 uw Exp $
+*  <email protected> $Id: form_element_combo.inc,v 1.9 2001/01/06 01:02:56 uw Exp $
 */
 class form_element_combo extends form_element_selectobject {
 
@@ -282,67 +282,79 @@
                 return $options;
         } // end func sortOptionList
         
- function get($value = "") {
+ /*
+ * Returns the HTML code of the combo box.
+ *
+ *  <email protected> string $subelement Use "select" to get the select box, "input" for
+ * the text input field and "add" for the "add option"
+ * button.
+ */
+ function get($subelement = "") {
         
                 if (true == $this->flag_frozen)
- return $this->getfrozen($value);
+ return $this->getfrozen($subelement);
+
+ $html = array();
                 
                 // we start with the select box
                 
- $html = sprintf('<select name="%s" ', $this->name);
+ $html["select"] = sprintf('<select name="%s" ', $this->name);
                 
                 if ("" != $this->size)
- $html .= sprintf('size="%d" ', $this->size);
+ $html["select"] .= sprintf('size="%d" ', $this->size);
                 if ($this->multiple)
- $html .= "multiple ";
+ $html["select"] .= "multiple ";
                 if ("" != $this->accesskey)
- $html.= sprintf('accesskey="%s" ', $this->accesskey);
+ $html["select"] .= sprintf('accesskey="%s" ', $this->accesskey);
                 if ($this->tabindex >= 0)
- $html .= sprintf('tabindex="%d" ', $this->tabindex);
+ $html["select"] .= sprintf('tabindex="%d" ', $this->tabindex);
 
- $html .= $this->getCommonHTMLAttributes();
- $html .= $this->getJSonActivation();
+ $html["select"] .= $this->getCommonHTMLAttributes();
+ $html["select"] .= $this->getJSonActivation();
                 
- $html = substr($html, 0, -1) . ">" . $this->CR_HTML;
+ $html["select"] = substr($html["select"], 0, -1) . ">" . $this->CR_HTML;
                 
- $html .= $this->getIntroOptionTags();
+ $html["select"] .= $this->getIntroOptionTags();
                 $this->sortOptions();
- $html .= $this->getOptionTags();
+ $html["select"] .= $this->getOptionTags();
                 
- $html .= "</select>";
+ $html["select"] .= "</select>";
 
                 // now the input field
                                 
- $html .= '<input type="text" value="" ';
- $html .= sprintf('name="%s_comboinput" ', $this->name );
+ $html["input"] = '<input type="text" value="" ';
+ $html["input"] .= sprintf('name="%s_comboinput" ', $this->name );
                 
                 if ($this->inputsize >= 0)
- $html .= sprintf('size="%d" ', $this->inputsize);
+ $html["input"] .= sprintf('size="%d" ', $this->inputsize);
                 if ($this->maxlength >= 0)
- $html .= sprintf('maxlength="%d" ', $this->maxlength);
+ $html["input"] .= sprintf('maxlength="%d" ', $this->maxlength);
                 if ("" != $this->accesskey)
- $html .= sprintf('accesskey="%s" ', $this->accesskey);
+ $html["input"] .= sprintf('accesskey="%s" ', $this->accesskey);
                 if ($this->tabindex >= 0)
- $html .= sprintf('tabindex="%d" ', $this->tabindex);
+ $html["input"] .= sprintf('tabindex="%d" ', $this->tabindex);
                 if ($this->readonly)
- $html .= "readonly ";
+ $html["input"] .= "readonly ";
                 
                 if ("" != $this->additional_html)
- $html .= sprintf('%s ', $this->additional_html);
+ $html["input"] .= sprintf('%s ', $this->additional_html);
 
- $html .= $this->getJSonActivation();
- $html = substr($html, 0 , -1) . ">";
+ $html["input"] .= $this->getJSonActivation();
+ $html["input"] = substr($html["input"], 0 , -1) . ">";
 
                 // add option button
                 
                 if ($this->add && $this->form_name)
- $html .= sprintf('<input type="submit" name="%s_combosubmit" value="%s" onClick="form_combo_add(\'%s\'); return false">',
+ $html["add"] .= sprintf('<input type="submit" name="%s_combosubmit" value="%s" onClick="form_combo_add(\'%s\'); return false">',
                                                                                                         $this->name,
                                                                                                         $this->add,
                                                                                                         $this->name
                                                                                                 );
-
- return $html . $this->CR_HTML;
+
+ if ($subelement && isset($html[$subelement]))
+ return $html[$subelement];
+
+ return join("", $html) . $this->CR_HTML;
         } // end func get
         
         function getExtraJS() {
@@ -352,6 +364,9 @@
         
         so = document.forms["%s"].elements["%s_comboinput"];
         s = so.value;
+ if (!s)
+ return;
+
         t = [];
         
         with (document.forms["%s"].elements[e]) {
Index: php-lib/php/form/form_element_date.inc
diff -u php-lib/php/form/form_element_date.inc:1.7 php-lib/php/form/form_element_date.inc:1.8
--- php-lib/php/form/form_element_date.inc:1.7 Tue Jan 2 16:49:32 2001
+++ php-lib/php/form/form_element_date.inc Sat Jan 6 02:02:56 2001
@@ -5,7 +5,7 @@
 * Use this meta element to make sure that the user enters a valid date.
 *
 *  <email protected> Ulf Wendel <uw <email protected>>
-*  <email protected> $Id: form_element_date.inc,v 1.7 2001/01/02 15:49:32 uw Exp $
+*  <email protected> $Id: form_element_date.inc,v 1.8 2001/01/06 01:02:56 uw Exp $
 *  <email protected> Form
 */
 class form_element_date extends form_element {
@@ -185,9 +185,9 @@
                 return $value;
         } // end func getValue
         
- function get($value = "") {
+ function get($subelement = "") {
 
- $html = "";
+ $html = array();
                 $len = strlen($this->format);
                 
                 for ($i = 0; $i < $len; $i++) {
@@ -198,98 +198,98 @@
                         switch($sign) {
                         
                                 case "a":
- $html .= $this->generateSelect("a", array("am", "pm"));
+ $html["a"] = $this->generateSelect("a", array("am", "pm"));
                                         break;
                                 case "A":
- $html .= $this->generateSelect("A", array("AM", "PM"));
+ $html["A"] = $this->generateSelect("A", array("AM", "PM"));
                                         break;
                                         
                                 case "d":
                                         for ($j = 1; $j <= 31; $j++)
                                                 $options[] = sprintf("%02d", $j);
- $html .= $this->generateSelect("d", $options);
+ $html["d"] = $this->generateSelect("d", $options);
                                         break;
                                         
                                 case "D":
- $html .= $this->generateSelect("D", $this->options[$this->language]["weekdays_short"]);
+ $html["D"] = $this->generateSelect("D", $this->options[$this->language]["weekdays_short"]);
                                         break;
                                 
                                 case "F":
- $html .= $this->generateSelect("F", $this->options[$this->language]["months_long"]);
+ $html["F"] = $this->generateSelect("F", $this->options[$this->language]["months_long"]);
                                         break;
                                 
                                 case "h":
                                         for ($j = 1; $j <= 12; $j++)
                                                 $options[] = sprintf("%02d", $j);
- $html .= $this->generateSelect("h", $options);
+ $html["h"] = $this->generateSelect("h", $options);
                                         break;
                                                 
                                 case "H":
                                         for ($j = 0; $j <= 23; $j++)
                                                 $options[] = sprintf("%02d", $j);
- $html .= $this->generateSelect("H", $options);
+ $html["H"] = $this->generateSelect("H", $options);
                                         break;
                                 
                                 case "g":
                                         for ($j = 1; $j <= 12; $j++)
                                                 $options[] = $j;
- $html .= $this->generateSelect("g", $options);
+ $html["g"] = $this->generateSelect("g", $options);
                                         break;
                                         
                                 case "G":
                                         for ($j = 0; $j <= 23; $j++)
                                                 $options[] = $j;
- $html.= $this->generateSelect("G", $options);
+ $html["G"] = $this->generateSelect("G", $options);
                                         break;
                                         
                                 case "i":
                                         for ($j = 0; $j <= 59; $j++)
                                                 $options[] = sprintf("%02d", $j);
- $html .= $this->generateSelect("i", $options);
+ $html["i"] = $this->generateSelect("i", $options);
                                         break;
                                         
                                 case "j":
                                         for ($j = 1; $j <= 31; $j++)
                                                 $options[] = $j;
- $html.= $this->generateSelect("j", $options);
+ $html["j"] = $this->generateSelect("j", $options);
                                         break;
                                         
                                 case "l":
- $html .= $this->generateSelect("l", $this->options[$this->language]["weekdays_long"]);
+ $html["l"] = $this->generateSelect("l", $this->options[$this->language]["weekdays_long"]);
                                         break;
                                         
                                 case "m":
                                         for ($j = 1; $j <= 12; $j++)
                                                 $options[] = sprintf("%02d", $j);
- $html .= $this->generateSelect("m", $options);
+ $html["m"] = $this->generateSelect("m", $options);
                                         break;
                                         
                                 case "n":
                                         for ($j = 1; $j <= 12; $j++)
                                                 $options[] = $j;
- $html .= $this->generateSelect("n", $options);
+ $html["n"] = $this->generateSelect("n", $options);
                                         break;
                                         
                                 case "M":
- $html .= $this->generateSelect("M", $this->options[$this->language]["months_short"]);
+ $html["M"] = $this->generateSelect("M", $this->options[$this->language]["months_short"]);
                                         break;
                                         
                                 case "s":
                                         for ($j = 0; $j <= 59; $j++)
                                                 $options[] = sprintf("%02d", $j);
- $html .= $this->generateSelect("s", $options);
+ $html["s"] = $this->generateSelect("s", $options);
                                         break;
                                 
                                 case "w":
                                         for ($j = 0; $j <= 6; $j++)
                                                 $options[] = $j;
- $html .= $this->generateSelect("w", $options);
+ $html["w"] = $this->generateSelect("w", $options);
                                         break;
                                         
                                 case "Y":
                                         for ($j = $this->min_year_long; $j <= $this->max_year_long; $j++)
                                                 $options[] = $j;
- $html .= $this->generateSelect("Y", $options);
+ $html["Y"] = $this->generateSelect("Y", $options);
                                         break;
                                         
                                 case "y":
@@ -310,26 +310,29 @@
                                                         
                                         }
                                         
- $html .= $this->generateSelect("y", $options);
+ $html["y"] = $this->generateSelect("y", $options);
                                         break;
                                 
                                 case "z":
                                         for ($j = 0; $j <= 365; $j++)
                                                 $options[] = $j;
- $html .= $this->generateSelect("z", $options);
+ $html["z"] = $this->generateSelect("z", $options);
                                         break;
                                 
                                 default:
- $html .= $sign;
+ $html[] = $sign;
                                         break;
                         }
                         
                 }
                 
                 if ($this->now)
- $html .= $this->generateButton();
-
- return $html;
+ $html["now"] = $this->generateButton();
+
+ if ($subelement && isset($html[$subelement]))
+ return $html[$subelement];
+
+ return join("", $html);
         } // end func get
         
         function generateButton() {
Index: php-lib/php/form/form_element_file.inc
diff -u php-lib/php/form/form_element_file.inc:1.7 php-lib/php/form/form_element_file.inc:1.8
--- php-lib/php/form/form_element_file.inc:1.7 Tue Jan 2 16:49:33 2001
+++ php-lib/php/form/form_element_file.inc Sat Jan 6 02:02:57 2001
@@ -8,7 +8,7 @@
 *  <email protected> Ulf Wendel <uw <email protected>>
 *  <email protected> Form
 *  <email protected> public
-*  <email protected> $Id: form_element_file.inc,v 1.7 2001/01/02 15:49:33 uw Exp $
+*  <email protected> $Id: form_element_file.inc,v 1.8 2001/01/06 01:02:57 uw Exp $
 */
 class form_element_file extends form_element_buttonobject {
 
@@ -109,10 +109,10 @@
         */
   var $valid_icase = false;
         
- function get($value = "") {
+ function get($subelement = "") {
         
                 if (true == $this->flag_frozen)
- return $this->getfrozen($value);
+ return $this->getfrozen($subelement);
                 
                 return $this->getInputFileTag();
         } // end func get
Index: php-lib/php/form/form_element_fileupload.inc
diff -u php-lib/php/form/form_element_fileupload.inc:1.7 php-lib/php/form/form_element_fileupload.inc:1.8
--- php-lib/php/form/form_element_fileupload.inc:1.7 Tue Jan 2 16:49:33 2001
+++ php-lib/php/form/form_element_fileupload.inc Sat Jan 6 02:02:58 2001
@@ -7,7 +7,7 @@
 *
 *  <email protected> Ulf Wendel <uw <email protected>>
 *  <email protected> Form
-*  <email protected> $Id: form_element_fileupload.inc,v 1.7 2001/01/02 15:49:33 uw Exp $
+*  <email protected> $Id: form_element_fileupload.inc,v 1.8 2001/01/06 01:02:58 uw Exp $
 *  <email protected> public
 */
 class form_element_fileupload extends form_element_file {
@@ -38,18 +38,26 @@
         */
         var $maxfilesize = 100000;
         
- function get($value = "") {
+ /**
+ *  <email protected> string Subelements: hidden, input.
+ */
+ function get($subelement = "") {
         
                 if (true == $this->flag_frozen)
- return $this->getfrozen($value);
+ return $this->getfrozen($subelement);
+
+ $html = array();
                 
- $html = sprintf('<input type="hidden" name="MAX_FILE_SIZE" value="%d">',
+ $html["hidden"] = sprintf('<input type="hidden" name="MAX_FILE_SIZE" value="%d">',
                                                                                                 $this->maxfilesize
                                                                                 );
 
- $html .= $this->getInputFileTag();
+ $html["input"] = $this->getInputFileTag();
                 
- return $html;
+ if ($subelement && isset($html[$subelement]))
+ return $html[$subelement];
+
+ return join("", $html);
         } // end func get
         
 } // end class form_element_fileupload
Index: php-lib/php/form/form_element_hidden.inc
diff -u php-lib/php/form/form_element_hidden.inc:1.6 php-lib/php/form/form_element_hidden.inc:1.7
--- php-lib/php/form/form_element_hidden.inc:1.6 Tue Jan 2 16:49:34 2001
+++ php-lib/php/form/form_element_hidden.inc Sat Jan 6 02:02:58 2001
@@ -3,16 +3,16 @@
 * Generates hidden elements.
 *
 *  <email protected> Ulf Wendel <uw <email protected>>
-*  <email protected> $Id: form_element_hidden.inc,v 1.6 2001/01/02 15:49:34 uw Exp $
+*  <email protected> $Id: form_element_hidden.inc,v 1.7 2001/01/06 01:02:58 uw Exp $
 *  <email protected> Form
 */
 class form_element_hidden extends form_element {
         
- function get($value = "") {
+ function get($subelement = "") {
 
                 return sprintf('<input type="hidden" name="%s" value="%s">',
                                                                                                 $this->name,
- ($value) ? $value : $this->value
+ $this->value
                                                                                         );
                                                                                         
         } // end func get
Index: php-lib/php/form/form_element_image.inc
diff -u php-lib/php/form/form_element_image.inc:1.7 php-lib/php/form/form_element_image.inc:1.8
--- php-lib/php/form/form_element_image.inc:1.7 Tue Jan 2 16:49:34 2001
+++ php-lib/php/form/form_element_image.inc Sat Jan 6 02:02:59 2001
@@ -5,7 +5,7 @@
 *  <email protected> Ulf Wendel <uw <email protected>>
 *  <email protected> Form
 *  <email protected> public
-*  <email protected> $Id: form_element_image.inc,v 1.7 2001/01/02 15:49:34 uw Exp $
+*  <email protected> $Id: form_element_image.inc,v 1.8 2001/01/06 01:02:59 uw Exp $
 */
 class form_element_image extends form_element_submit {
 
@@ -80,10 +80,10 @@
         */
         var $usemap = "";
                 
- function get($value = "") {
+ function get($subelement = "") {
                 
                 if ($this->frozen)
- return $this->getFrozen($value);
+ return $this->getFrozen($subelement);
                         
                 $html = sprintf('<input type="image" name="%s" src="%s" ',
                                                                                                         $this->name,
@@ -121,7 +121,7 @@
                 return substr($html, 0, -1) . ">" . $this->CR_HTML;
         } // end func get
         
- function getFrozen($value = "") {
+ function getFrozen($subelement = "") {
                 
                 $html = "";
 
Index: php-lib/php/form/form_element_password.inc
diff -u php-lib/php/form/form_element_password.inc:1.6 php-lib/php/form/form_element_password.inc:1.7
--- php-lib/php/form/form_element_password.inc:1.6 Tue Jan 2 16:49:35 2001
+++ php-lib/php/form/form_element_password.inc Sat Jan 6 02:02:59 2001
@@ -3,12 +3,12 @@
 * Generates a password input field, [input type="password"]
 *
 *  <email protected> Ulf Wendel <uw <email protected>>
-*  <email protected> $Id: form_element_password.inc,v 1.6 2001/01/02 15:49:35 uw Exp $
+*  <email protected> $Id: form_element_password.inc,v 1.7 2001/01/06 01:02:59 uw Exp $
 *  <email protected> Form
 */
 class form_element_password extends form_element_text {
 
- function getfrozen($value = "") {
+ function getfrozen($subelement = "") {
                 return '<table border="1"><tr><td>****</td></tr></table>' . $this->CR_HTML . $this->getFrozenHiddenElement($value);
         } // end func getfrozen
 
Index: php-lib/php/form/form_element_radio.inc
diff -u php-lib/php/form/form_element_radio.inc:1.7 php-lib/php/form/form_element_radio.inc:1.8
--- php-lib/php/form/form_element_radio.inc:1.7 Tue Jan 2 16:49:35 2001
+++ php-lib/php/form/form_element_radio.inc Sat Jan 6 02:03:00 2001
@@ -3,7 +3,7 @@
 * Generation of radio elements, [input type="radio" value=""].
 *
 *  <email protected> Ulf Wendel <uw <email protected>>
-*  <email protected> $Id: form_element_radio.inc,v 1.7 2001/01/02 15:49:35 uw Exp $
+*  <email protected> $Id: form_element_radio.inc,v 1.8 2001/01/06 01:03:00 uw Exp $
 *  <email protected> public
 *  <email protected> Form
 */
@@ -31,13 +31,10 @@
                 return true;
         } // end func setValue
         
- function get($value = "") {
+ function get($subelement = "") {
                 
- if ($value == $this->value)
- $this->checked = true;
-
                 if ($this->flag_frozen)
- return $this->getfrozen($value);
+ return $this->getfrozen($subelement);
                         
                 $html = sprintf('<input type="radio" name="%s" value="%s" ',
                                                                                         $this->name,
Index: php-lib/php/form/form_element_select.inc
diff -u php-lib/php/form/form_element_select.inc:1.7 php-lib/php/form/form_element_select.inc:1.8
--- php-lib/php/form/form_element_select.inc:1.7 Tue Jan 2 16:49:36 2001
+++ php-lib/php/form/form_element_select.inc Sat Jan 6 02:03:00 2001
@@ -4,7 +4,7 @@
 *
 *  <email protected> Ulf Wendel <uw <email protected>>
 *  <email protected> Form
-*  <email protected> $Id: form_element_select.inc,v 1.7 2001/01/02 15:49:36 uw Exp $
+*  <email protected> $Id: form_element_select.inc,v 1.8 2001/01/06 01:03:00 uw Exp $
 */
 class form_element_select extends form_element_selectobject {
 
@@ -26,10 +26,10 @@
         */
         var $multiple = false;
         
- function get($value = "") {
+ function get($subelement = "") {
 
                 if ($this->flag_frozen)
- return $this->getfrozen($value);
+ return $this->getfrozen($subelement);
                 
                 $html = sprintf('<select name="%s" ', $this->name);
                 
Index: php-lib/php/form/form_element_selectobject.inc
diff -u php-lib/php/form/form_element_selectobject.inc:1.7 php-lib/php/form/form_element_selectobject.inc:1.8
--- php-lib/php/form/form_element_selectobject.inc:1.7 Tue Jan 2 16:49:37 2001
+++ php-lib/php/form/form_element_selectobject.inc Sat Jan 6 02:03:01 2001
@@ -4,7 +4,7 @@
 *
 *  <email protected> Ulf Wendel <uw <email protected>>
 *  <email protected> Form
-*  <email protected> $Id: form_element_selectobject.inc,v 1.7 2001/01/02 15:49:37 uw Exp $
+*  <email protected> $Id: form_element_selectobject.inc,v 1.8 2001/01/06 01:03:01 uw Exp $
 *  <email protected>
 */
 class form_element_selectobject extends form_element {
@@ -140,7 +140,7 @@
                 return true;
         } // end func setValue
         
- function getfrozen($value = "") {
+ function getfrozen($subelement = "") {
         
                 if (!is_array($this->value)) {
                 
Index: php-lib/php/form/form_element_submit.inc
diff -u php-lib/php/form/form_element_submit.inc:1.7 php-lib/php/form/form_element_submit.inc:1.8
--- php-lib/php/form/form_element_submit.inc:1.7 Tue Jan 2 16:49:37 2001
+++ php-lib/php/form/form_element_submit.inc Sat Jan 6 02:03:01 2001
@@ -5,7 +5,7 @@
 *  <email protected> Ulf Wendel <uw <email protected>>
 *  <email protected> Form
 *  <email protected> public
-*  <email protected> $Id: form_element_submit.inc,v 1.7 2001/01/02 15:49:37 uw Exp $
+*  <email protected> $Id: form_element_submit.inc,v 1.8 2001/01/06 01:03:01 uw Exp $
 */
 class form_element_submit extends form_element_buttonobject {
         
@@ -30,10 +30,10 @@
         */
         var $height = -1;
         
- function get($value = "") {
+ function get($subelement = "") {
         
                 if ($this->flag_frozen)
- return $this->getfrozen($value);
+ return $this->getfrozen($subelement);
                 
                 $html = sprintf('<input type="submit" name="%s" value="%s" ',
                                                                                         $this->type,
Index: php-lib/php/form/form_element_text.inc
diff -u php-lib/php/form/form_element_text.inc:1.7 php-lib/php/form/form_element_text.inc:1.8
--- php-lib/php/form/form_element_text.inc:1.7 Tue Jan 2 16:49:38 2001
+++ php-lib/php/form/form_element_text.inc Sat Jan 6 02:03:02 2001
@@ -3,7 +3,7 @@
 * Generates a text input field, [input type="text"].
 *
 *  <email protected> Ulf Wendel <uw <email protected>>
-*  <email protected> $Id: form_element_text.inc,v 1.7 2001/01/02 15:49:38 uw Exp $
+*  <email protected> $Id: form_element_text.inc,v 1.8 2001/01/06 01:03:02 uw Exp $
 *  <email protected> public
 *  <email protected> Form
 */
@@ -35,10 +35,10 @@
         */
         var $size = -1;
         
- function get($value = "") {
+ function get($subelement = "") {
         
                 if (true == $this->flag_frozen)
- return $this->getfrozen($value);
+ return $this->getfrozen($subelement);
                         
                 $html = sprintf('<input type="%s" value="%s" name="%s" ',
                                                                                                 $this->type,
Index: php-lib/php/form/form_element_textarea.inc
diff -u php-lib/php/form/form_element_textarea.inc:1.7 php-lib/php/form/form_element_textarea.inc:1.8
--- php-lib/php/form/form_element_textarea.inc:1.7 Tue Jan 2 16:49:39 2001
+++ php-lib/php/form/form_element_textarea.inc Sat Jan 6 02:03:02 2001
@@ -3,7 +3,7 @@
 * Generates a [textarea].
 *
 *  <email protected> Ulf Wendel <uw <email protected>>
-*  <email protected> $Id: form_element_textarea.inc,v 1.7 2001/01/02 15:49:39 uw Exp $
+*  <email protected> $Id: form_element_textarea.inc,v 1.8 2001/01/06 01:03:02 uw Exp $
 *  <email protected> public
 *  <email protected> Form
 */
@@ -60,10 +60,10 @@
         var $valid_global = false;
         
         
- function get($value = "") {
+ function get($subelement = "") {
         
                 if (true == $this->flag_frozen)
- return $this->getfrozen($value);
+ return $this->getfrozen($subelement);
 
                 $html = sprintf('<textarea name="%s" ', $this->name);
                 
Index: php-lib/php/form/form_element_textobject.inc
diff -u php-lib/php/form/form_element_textobject.inc:1.6 php-lib/php/form/form_element_textobject.inc:1.7
--- php-lib/php/form/form_element_textobject.inc:1.6 Tue Jan 2 16:49:39 2001
+++ php-lib/php/form/form_element_textobject.inc Sat Jan 6 02:03:03 2001
@@ -6,7 +6,7 @@
 * for the HTML form elements "text" and "textarea".
 *
 *  <email protected> Ulf Wendel <uw <email protected>>
-*  <email protected> $Id: form_element_textobject.inc,v 1.6 2001/01/02 15:49:39 uw Exp $
+*  <email protected> $Id: form_element_textobject.inc,v 1.7 2001/01/06 01:03:03 uw Exp $
 *  <email protected> Form
 *  <email protected>
 */
@@ -109,7 +109,7 @@
                 return $this->validateLength() . $this->validateRegEx();
         } // end func validate
         
- function getfrozen($value = "") {
+ function getfrozen($subelement = "") {
                 return $this->getFrozenTable(1) . $this->getFrozenHiddenElement($value);
         } // end func getfrozen
         
Index: php-lib/php/form/form_element_tree.inc
diff -u php-lib/php/form/form_element_tree.inc:1.7 php-lib/php/form/form_element_tree.inc:1.8
--- php-lib/php/form/form_element_tree.inc:1.7 Tue Jan 2 16:49:40 2001
+++ php-lib/php/form/form_element_tree.inc Sat Jan 6 02:03:03 2001
@@ -6,7 +6,7 @@
 *
 *
 *  <email protected> Ulf Wendel <ulf.wendel <email protected>>
-*  <email protected> $Id: form_element_tree.inc,v 1.7 2001/01/02 15:49:40 uw Exp $
+*  <email protected> $Id: form_element_tree.inc,v 1.8 2001/01/06 01:03:03 uw Exp $
 *  <email protected> public
 *  <email protected> Form
 */
@@ -200,10 +200,10 @@
                 return true;
         } // end func setTree
         
- function get($value="") {
+ function get($subelement = "") {
 
                 if (true == $this->flag_frozen)
- return $this->getfrozen($value);
+ return $this->getfrozen($subelement);
 
                 if (!is_array($this->tree)) {
                         $this->setError(13, "form_elements_tree -> get(), illegal function call");
@@ -274,7 +274,7 @@
                 return $html;
         } // end func get()
         
- function getfrozen($value="") {
+ function getfrozen($subelement = "") {
                 
                 $html.= sprintf('<input type="hidden" name="%s" value="%s">%s',
                                                                                                 $this->name,
Index: php-lib/php/form/form_loader.inc
diff -u php-lib/php/form/form_loader.inc:1.4 php-lib/php/form/form_loader.inc:1.5
--- php-lib/php/form/form_loader.inc:1.4 Tue Jan 2 16:49:42 2001
+++ php-lib/php/form/form_loader.inc Sat Jan 6 02:03:04 2001
@@ -8,7 +8,7 @@
 *  <email protected> formloader
 *  <email protected> form
 *  <email protected> public
-*  <email protected> $Id: form_loader.inc,v 1.4 2001/01/02 15:49:42 uw Exp $
+*  <email protected> $Id: form_loader.inc,v 1.5 2001/01/06 01:03:04 uw Exp $
 *  <email protected> Ulf Wendel <ulf.wendel <email protected>>
 */
 
@@ -67,6 +67,7 @@
                                                                         "select" => array("form_element_selectobject", "form_element_select"),
                                                                         
                                                                         "date" => array("form_element_date"),
+ "calendar" => array("form_element_calendar"),