[drupal-devel] [feature] Add form_select() option CSS

Thox drupal-devel at drupal.org
Thu Jun 23 15:45:56 UTC 2005


Issue status update for http://drupal.org/node/25138

 Project:      Drupal
 Version:      cvs
 Component:    base system
 Category:     feature requests
 Priority:     normal
 Assigned to:  Anonymous
 Reported by:  budda
 Updated by:   Thox
 Status:       patch

-1


That's a lot of extra markup for every <select> control. Since it has
very limited use, I'd suggest it shouldn't be part of core.


I do like the idea of using it for your specific case.




Thox



Previous comments:
------------------------------------------------------------------------

June 16, 2005 - 14:54 : budda

i'd like to CSS my select menu  list. However the drupal common.inc
form_select() doesn't assign each  with a unique id/class.


the option list id's could be generated in the form:
<select-name>-<option value>


Which could produce something like:


  <select class="card" name="edit[card]" id="edit-card">
    <option value="" selected="selected">Please Choose</option>
    <option value="VISA" id="card-visa">Visa</option>
    <option value="MC" id="card-mc">Mastercard</option>
    <option value="SWITCH" id="card-switch">Switch</option>
    <option value="SOLO" id="card-solo">Solo</option>
  </select>


The above would then allow individual styling to each  - in my case
displaying an image next to each option.




------------------------------------------------------------------------

June 23, 2005 - 12:08 : budda

Attachment: http://drupal.org/files/issues/formselectcss.patch (1.82 KB)

Patch for above CSS modification request.


Most of what can currently be done with CSS on  elements is only useful
on Mozilla browsers. IE can't do anything exciting, it just ignores the
content.







More information about the drupal-devel mailing list