I couldn’t find a browsable list of valid Drupal core values for #type
fields in render arrays. I just wanted to know what was possible in one place. Andy Blum’s Drupal Smart Snippet’s plugin is great for writing the array, but you need to know what keyword you’re looking for.
So I filtered the data Andy uses for the plugin, and came up with a list of all the valid types!
For anyone else having this specific problem, mostly being my future self, here you go.
Valid Drupal #type
s
actions
ajax
button
checkbox
checkboxes
color
container
date
details
dropbutton
email
fieldgroup
fieldset
file
form
hidden
html
html_tag
htmltag
imagebutton
inline_template
inlinetemplate
item
label
languageselect
link
machine_name
machinename
more_link
morelink
number
operations
page
pager
pagetitle
password
password_confirm
passwordconfirm
pathelement
radio
radios
range
search
select
status_messages
statusmessages
statusreport
submit
system_compact_link
systemcompactlink
table
tableselect
tel
textarea
textfield
token
url
value
vertical_tabs
verticaltabs
weight