[dev] still problems with radio bottom
duck
duck at obala.net
Mon Mar 15 12:35:51 PST 2004
I still have problems with radio buttons (cvs 15.4.)
I chacked and forund that Horde_Forms receives radio value as an array
instead of an string
In Horde\Form.php at line 1790 I added
if ( is_array($value) ) {
$value = $value[0];
}
now passes validation but has still problems in rendering (don't
reselect checked value)
/* test script... problems occures in scry (editing and voting) too */
define('HORDE_BASE', dirname(__FILE__));
require_once HORDE_BASE . '/lib/base.php';
require_once HORDE_LIBS . 'Horde/Form.php';
require_once HORDE_LIBS . 'Horde/Form/Renderer.php';
require_once HORDE_LIBS . 'Horde/Variables.php';
$vars = &Variables::getDefaultVariables();
$form = &new Horde_Form($vars, _("Test"), 'test');
$form->addVariable(_("Test"), 'test', 'radio', true, false, false,
array( array("a"=>"a", "b"=>"b" ) ) );
if ( $form->validate($vars) ) {
echo " works ... ";
}
require $registry->getParam('templates', 'horde') . '/common-header.inc';
$renderer = &new Horde_Form_Renderer();
$form->renderActive($renderer, $vars, 'radio.php', 'post');
require $registry->getParam('templates', 'horde') . '/common-footer.inc';
*
*
More information about the dev
mailing list