there has been filed a ticket for a similar subject: http://cakephp.lighthouseapp.com/projects/42648/tickets/1124-hidden-input-fields-ignores-class-parameter probably fixed in 2.0, though
On 10 Mai, 07:33, Tilen Majerle <[email protected]> wrote: > try with $this->Form->{$type}('name', array('attributes')); > -- > Lep pozdrav, Tilen Majerlehttp://majerle.eu > > 2011/5/10 dreamingmind <[email protected]> > > > > > > > > > And changing to the use of the Form helper's input() method isn't a > > clear fix: > > > echo $form->hidden('ImageImgFileBatch', array( > > 'value' => 1, > > 'name' => 'data[Image][img_file][batch][]', > > 'id' => null, > > 'class' => 'batch' > > )); > > > Still produces: > > > <input type="hidden" value="1" name="data[Image][img_file][batch][]"> > > > Regards, > > Don > > > On May 9, 9:18 pm, dreamingmind <[email protected]> wrote: > > > Any insight into this strange outcome? > > > > $type = 'hidden'; > > > echo $form->input('ImageImgFileBatch', array( > > > 'value' => 1, > > > 'name' => 'data[Image][img_file][batch][]', > > > 'id' => null, > > > 'class' => 'batch', > > > 'type' => $type > > > )); > > > > produces this html: > > > > <input type="hidden" value="1" name="data[Image][img_file][batch][]" > > > class=" "> > > > > While, simply changing the value of $type: > > > > $type = 'text'; > > > echo $form->input('ImageImgFileBatch', array( > > > 'value' => 1, > > > 'name' => 'data[Image][img_file][batch][]', > > > 'id' => null, > > > 'class' => 'batch', > > > 'type' => $type > > > )); > > > > Produces this html: > > > > <div class="input text"> > > > <label for="ImageImgFileBatch">Image Img File Batch</label> > > > <input type="text" class="batch" value="1" name="data[Image] > > > [img_file][batch][]"> > > > </div> > > > > Any insight into this Form helper behavior and how to get the > > > attributes to remain in hidden fields (other than hiding them with > > > javascript)? > > > > Regards, > > > Don > > > -- > > Our newest site for the community: CakePHP Video Tutorials > >http://tv.cakephp.org > > Check out the new CakePHP Questions sitehttp://ask.cakephp.organd help > > others with their CakePHP related questions. > > > To unsubscribe from this group, send email to > > [email protected] For more options, visit this group > > athttp://groups.google.com/group/cake-php -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/cake-php
