我制作了一个自定义模块,它工作正常,直到我开始处理我的自定义主题。警告:在Drupal 7中缺少customvishal_form()的参数2:
一旦我动过我的自定义主题,我得到这个错误
警告:缺少论据2 customvishal_form(),称为 /家庭/维沙尔/ Dropbox的/网站/新/包括/主题。公司在customvisual_form()中定义的第1029行和第 行( /home/vishal/Dropbox/sites/new/sites/all/modules/customvishal/customvishal.module的第441行)。
你可以看到错误:http://www.iamvishal.com/dev/about-us
我觉得没有什么是错我的代码:
/**
* A simple form.
*/
function customvishal_form($form, &$form_submit) {
$form['customvishalactivate'] = array(
'#title' => t('Activate Preference'),
'#type' => 'radios',
'#options' => array('1' => t('Yes'), '0' => t('No')),
'#required' => TRUE,
);
return $form;
}
其从
function customvishal_pref($arg1)
{
// Here we willl make the form and save the data so when cron
// runs we will check the users preference
$build = array(
'header_text' => array(
'#type' => 'markup',
'#markup' => '<p>' . t('This page is where you add your preferences. Based on your
entered choices we will send you alerts ') . '</p>',
),
'example_form' => drupal_get_form('customvishal_form'),
);
return $build;
}
称为可能是什么造成这个问题?
干杯, 维沙尔
我试过很多主题和无法复制这个问题被称为
"skupina_statistics_form
。所以这似乎是一个主题问题,但我似乎无法解决它 – 2011-12-27 09:02:23