Not sure if the style element is what you are looking for: even if you could get the form element to render as proper HTML, the security of the form API would be hostile to any values ββsent from that element.
(Form elements in Drupal have a double life: they exist as HTML s, but also in the form_state cache. Thus, any form element that is not explicitly displayed by the form API will be discarded when the form is submitted.)
A better solution if you are looking for form- #options elements would be to create a form using the normal form API and have views #options element's #options array.
The _nodereference_potential_references_views function from nodereference The CCK add-in has a similar function and is likely to be a good place to start. (It uses CCK hooks, so you cannot copy-paste directly in this case, but it should give you a pretty good idea of ββwhat you need to do)
anschauung
source share