Learn Drupal MCQs
Prepare Drupal MCQs (Multiple choice Questions) for exam and job interviews.
What is the purpose of `hook_form_submit()`?
1) Handle form submissions
2) Create new forms
3) Delete forms
4) Manage form settings
Answer : Manage form settings
Which command would you use to export configuration from the active site?
1) drush config-export
2) drush config-export-all
3) drush export-config
4) drush config-save
Answer : drush export-config
What does `hook_entity_view_alter()` allow you to do?
1) Alter the display of entities
2) Create new entities
3) Delete entities
4) Manage entity permissions
Answer : Alter the display of entities
Which function is used to get a list of all available languages in Drupal?
1) language_list()
2) drupal_get_languages()
3) get_available_languages()
4) languages()
Answer : drupal_get_languages()
What is the function of `hook_menu()` in Drupal 7?
1) Define menu items
2) Create new nodes
3) Manage user permissions
4) Configure views
Answer : Create new nodes
Which module is essential for creating multilingual sites in Drupal?
1) Locale
2) Pathauto
3) Views
4) Block
Answer : Locale
What is the main function of a custom module in Drupal?
1) Extend Drupal functionality
2) Store user data
3) Manage configurations
4) Provide themes
Answer : Store user data
Which command is used to enable a module in Drush?
1) drush pm-enable module_name
2) drush enable module_name
3) drush module-enable module_name
4) drush pm-en module_name
Answer : drush pm-enable module_name
What does `hook_form_alter()` do in Drupal?
1) Modifies an existing form
2) Creates a new form
3) Deletes a form
4) Submits a form
Answer : Submits a form
What is the primary database used by Drupal?
1) MySQL
2) SQLite
3) PostgreSQL
4) MongoDB
Answer : MySQL