Bug #19306 [Opn->Bgs]: cannot set default

From: Date: Sat, 25 Feb 2012 07:30:28 +0000
Subject: Bug #19306 [Opn->Bgs]: cannot set default
References: 1  Groups: php.pear.bugs 
Request: Send a blank email to pear-bugs+get-8322@lists.php.net to get a copy of this message
Edit report at https://pear.php.net/bugs/bug.php?id=19306&edit=1 ID: 19306 Updated by: borz_off@cs.msu.su Reported By: sergiokessler at gmail dot com Summary: cannot set default -Status: Open +Status: Bogus Type: Bug Package: HTML_QuickForm2 Operating System: linux Package Version: 0.6.1 PHP Version: 5.3.2 Roadmap Versions: New Comment: -Status: Open +Status: Bogus http://pear.php.net/manual/en/package.html.html-quickform2.values-datasources.php Read the part on "Implementations of HTML_QuickForm2_DataSource" until enlightenment. Previous Comments: ------------------------------------------------------------------------ [2012-02-24 20:05:08] sak Description: ------------ $form->addDataSource(new HTML_QuickForm2_DataSource_Array(array( 'new_row[fecha]' => array('d' => 1, 'M' => 1, 'Y' => 2011), ))); this does not work, is completely ignored, because the [] in the field name. (if I changue the fieldname without using [], it works) Test script: --------------- ... $form->addElement('date', 'new_row[fecha]', $date_options) ->setLabel('Fecha:') ->addRule('required', 'Valor requerido') ; ... $form->addDataSource(new HTML_QuickForm2_DataSource_Array(array( 'new_row[fecha]' => array('d' => 1, 'M' => 1, 'Y' => 2011), ))); Expected result: ---------------- the date on screen should be updated Actual result: -------------- there is no default at all... ------------------------------------------------------------------------ -- Edit this bug report at https://pear.php.net/bugs/bug.php?id=19306&edit=1

« previous php.pear.bugs (#8322) next »