[Tickets #3165] NEW: Display/Input inconsistent for hourMinuteSecond variable type

bugs@bugs.horde.org bugs at bugs.horde.org
Sun Dec 18 01:47:50 PST 2005


DO NOT REPLY TO THIS MESSAGE. THIS EMAIL ADDRESS IS NOT MONITORED.

Ticket URL: http://bugs.horde.org/ticket/?id=3165
-----------------------------------------------------------------------
 Ticket             | 3165
 Created By         | robin at rainton.com
 Summary            | Display/Input inconsistent for hourMinuteSecond variable type
 Queue              | Horde Framework Packages
 Version            | HEAD
 State              | Unconfirmed
 Priority           | 2. Medium
 Type               | Bug
 Owners             | 
-----------------------------------------------------------------------


robin at rainton.com (2005-12-18 01:47) wrote:

Am trying to use an hourMinuteSecond variable for input and display only, by
doing something like this in a form object:

    $this->addVariable(_("Start Time"), "start_time", 'hourMinuteSecond',
false);

In order to put a value in there for display have tried these options:

      $this->_vars->set('start_time', array("hour" => $hour, "minute" =>
$minute, "second" => $second));

Which works when the form is active (input) but not inactive (display only).
In display only, the value is not shown (just a blank space appears).

Have also tried this:

      $this->_vars->set("start_time[hour]", $hour);
      $this->_vars->set("start_time[minute]", $minute);
      $this->_vars->set("start_time[second]", $second);

With the same result.

The only way to get something to appear in display only (inactive form) is
do to this:

      $this->_vars->set($timevar, "$hour:$minute:second");

But then the value is not shown when the form is active for input from the
user.

I believe the last option I show is incorrect and the display of the first
two is broken because there should be a custom
_renderVarDisplay_hourMinuteSecond functon.




More information about the bugs mailing list