Pattern Syntax: Form tag
Last updated on
30 April 2025
Pattern files can also use a "form" tag to directly fill in values for most Drupal forms. This is an easy way to submit forms when there isn't a specific pattern syntax for certain modules.
Here are a few quick YAML examples for using the "form" tag:
- tag: form
form_id: system_error_reporting_settings
site_403: 403-access-denied
site_404: 404-page-not-found
- tag: form
form_id: adminrole_admin_settings
adminrole_adminrole: @adminrole@
- tag: form
form_id: addanother_admin
addanother_nodetypes:
page: page
- tag: form
form_id: system_performance_settings
cache: true
page_compression: true
block_cache: true
preprocess_css: true
preprocess_js: true
- tag: form
form_id: system_performance_settings
clear: Clear cached data
- tag: form
form_id: emfield_settings
emfield_emvideo_allow_bliptv: 1
emfield_emvideo_allow_google: 1
emfield_emvideo_allow_metacafe: 1
emfield_emvideo_allow_vimeo: 1
emfield_emvideo_allow_youtube: 1
- tag: form
form_id: devel_admin_settings
dev_timer: true
devel_form_weights: true
- tag: form
form_id: devel_generate_users_form
num: 60
time_range: 2592000
- tag: form
form_id: devel_generate_taxonomy_form
num_vocab: 6
num_terms: 80
title_length: 10
- tag: form
form_id: devel_generate_content_form
node_types:
page: page
story: story
num_nodes: 75
time_range: 2592000
num_comments: 4
title_length: 10
add_terms: true
add_alias: true
Help improve this page
Page status: Not set
You can:
You can:
- Log in, click Edit, and edit this page
- Log in, click Discuss, update the Page status value, and suggest an improvement
- Log in and create a Documentation issue with your suggestion