我製作了一個自定義模塊,它工作正常,直到我開始處理我的自定義主題。警告:在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