Heine
Drupal
Drupal Core Commits
Security
Guides
Forum
Contact
About
Recent posts
Drupal clean URLs on IIS 7
Why are these examples of dangerous code?
Security theater #1 - Using SSL for login
# 8 on the Vendors with Most Vulnerability Disclosures list
Access denied - Are you sure?
Popular
Update UID 1 password via JS
Keeping an eye on Drupal core
Drupal 5.x Core tables
Subversion on Strato V-PowerServer
Access denied - Are you sure?
more
Home
›
Guides
›
Elements
›
Comboselect element
Change the 'Other' option
function
example_elements_form
(
)
{
$form
=
array
(
)
;
$options
=
array
(
'one'
=
>
t
(
'First Option'
)
,
'two'
=
>
t
(
'Second Option'
)
,
)
;
$form
[
'test'
]
=
array
(
'#type'
=
>
'comboselect'
,
'#title'
=
>
t
(
'Example'
)
,
'#required'
=
>
TRUE
,
'#default_options'
=
>
$options
,
'#other'
=
>
t
(
'None of the above, but'
)
,
)
;
$form
[
'submit'
]
=
array
(
'#type'
=
>
'submit'
,
'#value'
=
>
t
(
'Submit'
)
,
)
;
return
$form
;
}
Your rating:
Select rating
Cancel rating
Give it 1/5
Give it 2/5
Give it 3/5
Give it 4/5
Give it 5/5
No votes yet
Attachment
Size
comboselect_other_wording.JPG
15.45 KB
‹ Create a simple comboselect element
up
Tableselect element ›
Printer-friendly version