Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/drupal/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php Drupal 7:提交后的高级主题设置_Php_Drupal_Drupal 6 - Fatal编程技术网

Php Drupal 7:提交后的高级主题设置

Php Drupal 7:提交后的高级主题设置,php,drupal,drupal-6,Php,Drupal,Drupal 6,我对theme-settings.php中的高级设置有问题。我可以用这个--> 功能。但提交设置后如何集成新功能?像这样: mytheme_system_theme_settings_submit_alter($form, &$form_state) { // if form submited -> execute function } 您可以在alter函数本身中将自定义提交处理程序添加到表单中: function mytheme_form_system_theme_set

我对theme-settings.php中的高级设置有问题。我可以用这个-->

功能。但提交设置后如何集成新功能?像这样:

mytheme_system_theme_settings_submit_alter($form, &$form_state) {
  // if form submited -> execute function
}

您可以在alter函数本身中将自定义提交处理程序添加到表单中:

function mytheme_form_system_theme_settings_alter(&$form, &$form_state) {
  // Build up the rest of the form.

  // Add your submission handler to the form.
  $form['#submit'][] = 'mytheme_form_system_theme_settings_submit';
}

function mytheme_form_system_theme_settings_submit(&$form, &$form_state) {
  // Form has been submitted, execute your function.
}

当我执行此操作时,会出现以下错误:在第1460行的includes/form.inc中调用未定义的函数mytheme\u form\u system\u theme\u settings\u submit()。有什么想法吗?您需要用主题的名称替换
my\u theme
)哈,我这么做了,只是把它重新格式化成你拥有的。上面的每个地方都有“mytheme”,我有“cdf”,所以我的错误是:cdf\u form\u system\u theme\u settings\u submit()。真奇怪。有什么想法吗?
function mytheme_form_system_theme_settings_alter(&$form, &$form_state) {
  // Build up the rest of the form.

  // Add your submission handler to the form.
  $form['#submit'][] = 'mytheme_form_system_theme_settings_submit';
}

function mytheme_form_system_theme_settings_submit(&$form, &$form_state) {
  // Form has been submitted, execute your function.
}