#6458: [PATCH] Only append input[type=radio] value to id attribute when
count($option['options']) > 1
----------------------------+-----------------------------------------------
    Reporter:  mikesmullin  |          Type:  Enhancement
      Status:  new          |      Priority:  Low        
   Milestone:  1.3.x.x      |     Component:  Helpers    
     Version:  1.2 Final    |      Severity:  Normal     
    Keywords:               |   Php_version:  n/a        
Cake_version:               |  
----------------------------+-----------------------------------------------
 When you are only trying to render a single `$form->input('radio')`
 element (e.g. only one option), it is highly annoying that CakePHP
 FormHelper feels the need to modify the 'id' attribute I provide to it.
 Usually when I am attempting to render radio elements individually instead
 of altogether in an $options['options'] array I am doing so because I want
 more control over how each element is rendered. Therefore the id attribute
 I set is the one I expect.

 Anyhow, when you only have one element there is no need to append the
 value to its id for uniqueness anyway, since there will only be one
 element rendered.

 My proposal is that the FormHelper check how many options are there and
 only suffix the sanitized value to the input[type=radio].id when there is
 more than one option.

 (see attached: patch)

-- 
Ticket URL: <https://trac.cakephp.org/ticket/6458>
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 
flexibility.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"tickets cakephp" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/tickets-cakephp?hl=en
-~----------~----~----~----~------~----~------~--~---

  • [CakePHP : The Rapid Dev... CakePHP : The Rapid Development Framework for PHP

Reply via email to