Re: Followup Q to HTML_QuickForm With Arrays as Text Elements?

From: Date: Wed, 05 Nov 2003 17:31:57 +0000
Subject: Re: Followup Q to HTML_QuickForm With Arrays as Text Elements?
References: 1  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-8780@lists.php.net to get a copy of this message
<jkaufman@wamnetgov.com> wrote : > If I set up my form like this (recommended by Bernard Mansion): My name is Bertrand, not Bernard !!! > $form->addElement ('text', "reqdate[0]", 'Req. Start', > array('size'=>'10')); > > It looks ok in a QuickForm dump: > > [11] => html_quickform_text Object > ( > [_attributes] => Array > ( > [size] => 10 > [name] => reqdate[0] > [type] => text > [value] => 07/17/2003 > ) > [_tabOffset] => 0 > [_tab] => > [_lineEnd] => > [_comment] => > [_label] => Req. Start > [_type] => text > [_flagFrozen] => > [_persistantFreeze] => 1 > ) > > However, I'm using the ArraySmarty renderer, and the smarty dump looks > like: > > [0] => Array > ( > [name] => reqdate[0] > [value] => 07/17/2003 > [type] => text > [frozen] => > [label] => Req. Start > [required] => > [error] => > [html] => > ) > > Notice that the array key changed from 'reqdate[0]' to '[0]'. Is this > another array_merge glitch? Some obvious fix? I don't see any difference between the two ? Bertrand Mansion Mamasam

« previous php.pear.general (#8780) next »