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

budda drupal-devel at drupal.org
Thu Jun 23 11:08:32 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:   budda
-Status:       active
+Status:       patch
 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.




budda



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

June 16, 2005 - 13: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.







More information about the drupal-devel mailing list