This page provides a programmer's reference to the Backdrop CMS Form API. For a brief introduction on how to create forms, see the Form generation guide. For more extensive information about the Form API, see the Form API handbook (Drupal 7 documentation).

Skip to: Default Values | Elements | Properties

Input elements

buttoncheckboxcheckboxescolordateemailfilehtml_datehtml_datetimehtml_timeimage_buttonlink_fieldmachine_namemanaged_filenumberoptionspasswordpassword_confirmradioradiosrangesearchselectsubmittableselectteltextareatextfieldtext_formaturlweight
#access
#after_build
#ajax
#allow_focus
#array_parents
#attached
#attributes
#autocomplete_path
#base_type
#browser_view
#button_type
#children
#cols
#default_value
#default_value_allowed
#default_value_pattern
#delta
#description
#disabled
#editor_uploads
#element_validate
#empty
#empty_option
#empty_value
#executes_submit_callback
#extended
#field_prefix
#field_suffix
#format
#has_garbage_value
#header
#id
#indentation
#input
#js_select
#key_type
#key_type_toggle
#key_type_toggled
#limit
#limit_validation_errors
#max
#maxlength
#min
#multiple
#name
#optgroups
#options
#options_readonly
#parents
#password_shown
#password_strength
#password_toggle
#placeholder
#post_render
#prefix
#pre_render
#process
#progress_indicator
#progress_message
#required
#required_message
#resizable
#return_value
#rows
#size
#src
#states
#step
#submit
#suffix
#theme
#theme_wrappers
#title
#title_display
#token_types
#tree
#type
#upload_location
#upload_validators
#validate
#value
#value_callback
#weight
#wrapper_attributes

Structure elements

actionsajaxcontainercontextual_linksdetailsdropbuttonfieldsetfield_ui_tableformhead_taghelphiddenitemlinkmarkupoperationsscriptsstylestokenvaluevertical_tabs
#access
#action
#after_build
#aggregate_callback
#ajax
#attached
#attributes
#children
#collapsed
#collapsible
#commands
#config
#default_tab
#default_value
#description
#details
#disabled
#element_validate
#error
#field_prefix
#field_suffix
#group
#group_callback
#header
#https
#id
#indentation
#input
#items
#links
#markup
#method
#name
#open
#options
#parents
#parent_options
#post_render
#prefix
#pre_render
#process
#redirect
#regions
#required
#required_message
#states
#submit
#suffix
#summary
#tag
#theme
#theme_wrappers
#title
#title_display
#token_types
#tree
#type
#validate
#value
#weight
#wrapper_attributes

Default values

Every element automatically has these default values (see system_element_info()):

The following is a list of default values which do not need to be set (found in system_element_info):

actions

ajax

button

checkbox

checkboxes

color

container

contextual_links

date

details

dropbutton

email

fieldset

field_ui_table

file

form

head_tag

help

hidden

html_date

html_datetime

html_time

image_button

item

link

  • #pre_render = array('backdrop_pre_render_link', 'backdrop_pre_render_markup')

link_field

machine_name

managed_file

markup

number

operations

  • #pre_render = array('backdrop_pre_render_dropbutton')
  • #theme = links__dropbutton__operations

options

password

password_confirm

radio

radios

range

scripts

search

select

styles

submit

tableselect

tel

textarea

textfield

text_format

token

url

vertical_tabs

weight

Elements

Properties