#6501: 'hidden' => false option for the hidden input in form helper
radio/checkbox/select inputs
    Reporter:  ProLoser     |          Type:  Enhancement
      Status:  new          |      Priority:  Low        
   Milestone:  1.3.x.x      |     Component:  Helpers    
     Version:  1.2 Final    |      Severity:  Minor      
    Keywords:  form helper  |   Php_version:  n/a        
Cake_version:               |  
 I think it would be helpful if the argument 'hidden' => false could be
 added to $options for radio/checkboxes/select lists. The reason is because
 when displaying multiple groups of checkboxes or selects on one form, all
 the preceeding values are wiped by the last group's initial hidden tree
 stump decleration:
 <input type="hidden" name="data[Model][Model]" />
 This is then followed by the standard:
 <input name="data[Model][Model][]" />
 This input works just fine even in multiple groups on the form.

 I have been one of three individuals in the last few days that have had to
 jump a few hurdles to get around this simply because we cannot prevent
 certain auto-generated html output.

 An example solution would be simply placing:
 if (!isset($attributes['hidden']) || $attributes['hidden'] == false)


 $select[] = $this->hidden(null, array('value' => '', 'id' => null,
 'secure' => false));
 and possibly in a few other locations amongst the helper.

 Since I'm not sure I can expect the helper to detect multiple instances of
 itself in 1 form, at the very least it would be nice to make it a passable
 option. Right now I'm forced to manually build the sets of inputs and then
 remerge the data, I just find it unusual not to have full control on the
 generated html output.

Ticket URL: <https://trac.cakephp.org/ticket/6501>
CakePHP : The Rapid Development Framework for PHP <https://trac.cakephp.org/>
Cake is a rapid development framework for PHP which uses commonly known design 
patterns like ActiveRecord, Association Data Mapping, Front Controller and MVC. 
Our primary goal is to provide a structured framework that enables PHP users at 
all levels to rapidly develop robust web applications, without any loss to 
You received this message because you are subscribed to the Google Groups 
"tickets cakephp" group.
To post to this group, send email to tickets-cakephp@googlegroups.com
To unsubscribe from this group, send email to 
For more options, visit this group at 

Reply via email to